File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
driver/kubernetes/context Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,20 @@ import (
1313
1414func TestDefaultContextInitializer (t * testing.T ) {
1515 t .Setenv ("KUBECONFIG" , "./fixtures/test-kubeconfig" )
16- ctx , err := command .ResolveDefaultContext ( & cliflags. ClientOptions {}, command . DefaultContextStoreConfig () )
16+ dockerCLI , err := command .NewDockerCli ( )
1717 require .NoError (t , err )
18- assert .Equal (t , "default" , ctx .Meta .Name )
19- assert .Equal (t , "zoinx" , ctx .Meta .Endpoints [KubernetesEndpoint ].(EndpointMeta ).DefaultNamespace )
18+
19+ // FIXME(thaJeztah): the context-store is not initialized until "Initialize" is called.
20+ err = dockerCLI .Initialize (cliflags .NewClientOptions ())
21+ require .NoError (t , err )
22+
23+ cs := dockerCLI .ContextStore ()
24+ assert .NotNil (t , cs )
25+ meta , err := cs .GetMetadata (command .DefaultContextName )
26+ require .NoError (t , err )
27+
28+ assert .Equal (t , "default" , meta .Name )
29+ assert .Equal (t , "zoinx" , meta .Endpoints [KubernetesEndpoint ].(EndpointMeta ).DefaultNamespace )
2030}
2131
2232func TestConfigFromEndpoint (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments