mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +00:00
Merge pull request #8646 from andronat/failed_test_TestCreateMissingContext
Test fails when arbitrary kubernetes master is set
This commit is contained in:
commit
b31505bfba
@ -165,12 +165,14 @@ func TestCreateMissingContext(t *testing.T) {
|
||||
const expectedErrorContains = "Context was not found for specified context"
|
||||
config := createValidTestConfig()
|
||||
clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{})
|
||||
expectedConfig := &client.Config{Host: "http://localhost:8080"}
|
||||
|
||||
clientConfig, err := clientBuilder.ClientConfig()
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
}
|
||||
|
||||
expectedConfig := &client.Config{Host: clientConfig.Host}
|
||||
|
||||
if !reflect.DeepEqual(expectedConfig, clientConfig) {
|
||||
t.Errorf("Expected %#v, got %#v", expectedConfig, clientConfig)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user