Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

tests: added "fleetctl --tunnel" tests #1492

Merged
merged 10 commits into from
Mar 21, 2016
Merged

Conversation

kayrus
Copy link
Contributor

@kayrus kayrus commented Mar 9, 2016

adding tests which will cover #565 #1425 #1455
closes #1484

@kayrus kayrus force-pushed the kayrus/ssh_tests branch from 8a62ab6 to 010dc52 Compare March 10, 2016 16:01
@kayrus
Copy link
Contributor Author

kayrus commented Mar 10, 2016

Looks like WaitForNActiveUnits doesn't wait for N active units, which are templates. have to fix that.

@kayrus
Copy link
Contributor Author

kayrus commented Mar 15, 2016

Yet another test for #565:

$ export REMOTE_HOST=localhost
$ eval $(ssh-agent)
$ for i in {1..10}; do (ssh-keygen -t rsa -b 1024 -f $HOME/.ssh/test_rsa_$i -N ''; ssh-add $HOME/.ssh/test_rsa_$i)& done; wait; echo "done"
$ fleetctl -strict-host-key-checking=false --tunnel $REMOTE_HOST list-machines
Unable to initialize client: failed initializing SSH client: ssh: handshake failed: ssh: unexpected message type 1 (expected 52)
$ ssh-agent -k
$ rm $HOME/.ssh/test_rsa_*

@kayrus kayrus force-pushed the kayrus/ssh_tests branch from 6c08547 to 3f3daa2 Compare March 17, 2016 15:57
@kayrus
Copy link
Contributor Author

kayrus commented Mar 17, 2016

Trying to find other way to fix this bug. ea415ad is only workaround which doesn't explain cause of the problem

@kayrus
Copy link
Contributor Author

kayrus commented Mar 18, 2016

@jonboulle if you accept this fix, let's merge this PR. and I'll try to find proper solution later within new issue.

if _, _, err := run(cmd); err != nil {
return err
}

fleetdBinDst := path.Join(dir, "opt", "fleet", "fleetd")
return copyFile(fleetdBinPath, fleetdBinDst, 0755)
BinDst := path.Join(dst, "opt", "fleet", path.Base(src))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, binDst

@jonboulle
Copy link
Contributor

Couple of nits but LGTM overall!

@jonboulle jonboulle changed the title [WIP] tests: added "fleetctl --tunnel" tests tests: added "fleetctl --tunnel" tests Mar 21, 2016
@kayrus
Copy link
Contributor Author

kayrus commented Mar 21, 2016

@tixxdz any remarks or objections?

* renamed BinDst into binDst
* split "Launch one unit" string
@kayrus kayrus force-pushed the kayrus/ssh_tests branch from 3ad2ac2 to fd6b2f6 Compare March 21, 2016 12:12
@@ -30,10 +30,14 @@ import (
type SSHForwardingClient struct {
agentForwarding bool
*gossh.Client
agentForwardingEnabled bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, one minor: could you please rename this to: authAgentReqSent or agentForwardingSent , but not Enabled, and also put some code comment: "Used to check if we have already sent the request to the ssh channel".

@tixxdz
Copy link
Contributor

tixxdz commented Mar 21, 2016

@kayrus thank you, please if you could change the name of that variable! then will merge.

tixxdz added a commit that referenced this pull request Mar 21, 2016
tests: added "fleetctl --tunnel" tests
@tixxdz tixxdz merged commit d98fc61 into coreos:master Mar 21, 2016
@tixxdz
Copy link
Contributor

tixxdz commented Mar 21, 2016

@kayrus ok thank you merged, and thanks also for triggering that "remote: Daily bandwidth rate limit exceeded..." !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests: create new tests
3 participants