Commit b31505bf authored by Dawn Chen's avatar Dawn Chen

Merge pull request #8646 from andronat/failed_test_TestCreateMissingContext

Test fails when arbitrary kubernetes master is set
parents aee99717 66a758b8
...@@ -165,12 +165,14 @@ func TestCreateMissingContext(t *testing.T) { ...@@ -165,12 +165,14 @@ func TestCreateMissingContext(t *testing.T) {
const expectedErrorContains = "Context was not found for specified context" const expectedErrorContains = "Context was not found for specified context"
config := createValidTestConfig() config := createValidTestConfig()
clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{}) clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{})
expectedConfig := &client.Config{Host: "http://localhost:8080"}
clientConfig, err := clientBuilder.ClientConfig() clientConfig, err := clientBuilder.ClientConfig()
if err != nil { if err != nil {
t.Errorf("Unexpected error: %v", err) t.Errorf("Unexpected error: %v", err)
} }
expectedConfig := &client.Config{Host: clientConfig.Host}
if !reflect.DeepEqual(expectedConfig, clientConfig) { if !reflect.DeepEqual(expectedConfig, clientConfig) {
t.Errorf("Expected %#v, got %#v", expectedConfig, clientConfig) t.Errorf("Expected %#v, got %#v", expectedConfig, clientConfig)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment