Fake tillerHost at version cmd tests

Version cmd tries to set up a tunnel at RunE instead of using the
PersistentPreRunE. That means that for each version test (3) it
tries to set up the tunnel. When running the tests on an internetless
or whithout a valid k8s environment, the tunnel will fail with a
timeout of 20 seconds, meaning that it will take 60 seconds to
run the test.

This commit adds a fake tillerHost so it will not try to setup the
tunnel.
pull/1851/head
Ferran Rodenas 8 years ago
parent 7389b341c7
commit cc0f460033

@ -39,6 +39,7 @@ func TestVersion(t *testing.T) {
{"server", false, true, []string{"-s"}, false},
}
tillerHost = "fake-localhost"
for _, tt := range tests {
b := new(bytes.Buffer)
c := &fakeReleaseClient{}

Loading…
Cancel
Save