@@ -66,24 +66,24 @@ describe("K3sContainer", { timeout: 120_000 }, () => {
6666 } , 60_000 ) ;
6767 // }
6868 } ) ;
69- }
7069
71- it ( "should expose kubeconfig for a network alias" , async ( ) => {
72- // k3sAliasedKubeConfig {
73- await using network = await new Network ( ) . start ( ) ;
74- await using container = await new K3sContainer ( IMAGE ) . withNetwork ( network ) . withNetworkAliases ( "k3s" ) . start ( ) ;
70+ it ( "should expose kubeconfig for a network alias" , async ( ) => {
71+ // k3sAliasedKubeConfig {
72+ await using network = await new Network ( ) . start ( ) ;
73+ await using container = await new K3sContainer ( IMAGE ) . withNetwork ( network ) . withNetworkAliases ( "k3s" ) . start ( ) ;
7574
76- const kubeConfig = container . getAliasedKubeConfig ( "k3s" ) ;
75+ const kubeConfig = container . getAliasedKubeConfig ( "k3s" ) ;
7776
78- await using kubectlContainer = await new GenericContainer ( "rancher/kubectl:v1.31.2" )
79- . withNetwork ( network )
80- . withCopyContentToContainer ( [ { content : kubeConfig , target : "/home/kubectl/.kube/config" } ] )
81- . withCommand ( [ "get" , "namespaces" ] )
82- . withWaitStrategy ( Wait . forOneShotStartup ( ) )
83- . start ( ) ;
77+ await using kubectlContainer = await new GenericContainer ( "rancher/kubectl:v1.31.2" )
78+ . withNetwork ( network )
79+ . withCopyContentToContainer ( [ { content : kubeConfig , target : "/home/kubectl/.kube/config" } ] )
80+ . withCommand ( [ "get" , "namespaces" ] )
81+ . withWaitStrategy ( Wait . forOneShotStartup ( ) )
82+ . start ( ) ;
8483
85- const chunks = await ( await kubectlContainer . logs ( ) ) . toArray ( ) ;
86- expect ( chunks ) . toEqual ( expect . arrayContaining ( [ expect . stringContaining ( "kube-system" ) ] ) ) ;
87- // }
88- } ) ;
84+ const chunks = await ( await kubectlContainer . logs ( ) ) . toArray ( ) ;
85+ expect ( chunks ) . toEqual ( expect . arrayContaining ( [ expect . stringContaining ( "kube-system" ) ] ) ) ;
86+ // }
87+ } ) ;
88+ }
8989} ) ;
0 commit comments