@@ -40,67 +40,67 @@ func TestE2e(t *testing.T) {
4040 subject := "limactl"
4141 vmConfigFile := filepath .Join (wd , "./../_output/lima-template/fedora.yaml" )
4242 vmName := "fedora"
43- o , err := option .New ([]string {subject })
43+ limaOpt , err := option .New ([]string {subject })
44+ nerdctlOpt , err := option .New ([]string {subject , "shell" , "fedora" , "sudo" , "-E" , "nerdctl" })
45+ if err != nil {
46+ t .Fatalf ("failed to initialize a testing option: %v" , err )
47+ }
4448
4549 ginkgo .SynchronizedBeforeSuite (func () []byte {
46- command .New (o , "start" , vmConfigFile ).WithTimeoutInSeconds (600 ).Run ()
50+ command .New (limaOpt , "start" , vmConfigFile ).WithTimeoutInSeconds (600 ).Run ()
51+ tests .SetupLocalRegistry (nerdctlOpt )
4752 return nil
4853 }, func (bytes []byte ) {})
4954
5055 ginkgo .SynchronizedAfterSuite (func () {
51- command .New (o , "stop" , vmName ).WithTimeoutInSeconds (90 ).Run ()
52- command .New (o , "remove" , vmName ).WithTimeoutInSeconds (60 ).Run ()
56+ command .New (limaOpt , "stop" , vmName ).WithTimeoutInSeconds (90 ).Run ()
57+ command .New (limaOpt , "remove" , vmName ).WithTimeoutInSeconds (60 ).Run ()
5358 }, func () {})
5459
55- opt , err := option .New ([]string {subject , "shell" , "fedora" , "sudo" , "-E" , "nerdctl" })
56- if err != nil {
57- t .Fatalf ("failed to initialize a testing option: %v" , err )
58- }
59-
6060 ginkgo .Describe (description , func () {
6161 // TODO: add more e2e tests and make them work.
62- tests .Save (opt )
63- tests .Load (opt )
64- tests .Pull (opt )
65- tests .Rm (opt )
66- tests .Rmi (opt )
67- tests .Start (opt )
68- tests .Stop (opt )
69- tests .Cp (opt )
70- tests .Tag (opt )
71- tests .Build (opt )
72- tests .Push (opt )
73- tests .Images (opt )
74- tests .ComposeBuild (opt )
75- tests .ComposeDown (opt )
76- tests .ComposeKill (opt )
77- tests .ComposePs (opt )
78- tests .ComposePull (opt )
79- tests .ComposeLogs (opt )
80- tests .Create (opt )
81- tests .Port (opt )
82- tests .Kill (opt )
83- tests .Stats (opt )
84- tests .BuilderPrune (opt )
85- tests .Exec (opt )
86- tests .Logs (opt )
87- tests .Login (opt )
88- tests .Logout (opt )
89- tests .VolumeCreate (opt )
90- tests .VolumeInspect (opt )
91- tests .VolumeLs (opt )
92- tests .VolumeRm (opt )
93- tests .VolumePrune (opt )
94- tests .ImageHistory (opt )
95- tests .ImageInspect (opt )
96- tests .ImagePrune (opt )
97- tests .Info (opt )
98- tests .Events (opt )
99- tests .Inspect (opt )
100- tests .NetworkCreate (opt )
101- tests .NetworkInspect (opt )
102- tests .NetworkLs (opt )
103- tests .NetworkRm (opt )
62+ tests .Save (nerdctlOpt )
63+ tests .Load (nerdctlOpt )
64+ tests .Pull (nerdctlOpt )
65+ tests .Rm (nerdctlOpt )
66+ tests .Rmi (nerdctlOpt )
67+ tests .Start (nerdctlOpt )
68+ tests .Stop (nerdctlOpt )
69+ tests .Cp (nerdctlOpt )
70+ tests .Tag (nerdctlOpt )
71+ tests .Build (nerdctlOpt )
72+ tests .Push (nerdctlOpt )
73+ tests .Images (nerdctlOpt )
74+ tests .ComposeBuild (nerdctlOpt )
75+ tests .ComposeDown (nerdctlOpt )
76+ tests .ComposeKill (nerdctlOpt )
77+ tests .ComposePs (nerdctlOpt )
78+ tests .ComposePull (nerdctlOpt )
79+ tests .ComposeLogs (nerdctlOpt )
80+ tests .Create (nerdctlOpt )
81+ tests .Port (nerdctlOpt )
82+ tests .Kill (nerdctlOpt )
83+ tests .Stats (nerdctlOpt )
84+ tests .BuilderPrune (nerdctlOpt )
85+ tests .Exec (nerdctlOpt )
86+ tests .Logs (nerdctlOpt )
87+ tests .Login (nerdctlOpt )
88+ tests .Logout (nerdctlOpt )
89+ tests .VolumeCreate (nerdctlOpt )
90+ tests .VolumeInspect (nerdctlOpt )
91+ tests .VolumeLs (nerdctlOpt )
92+ tests .VolumeRm (nerdctlOpt )
93+ tests .VolumePrune (nerdctlOpt )
94+ tests .ImageHistory (nerdctlOpt )
95+ tests .ImageInspect (nerdctlOpt )
96+ tests .ImagePrune (nerdctlOpt )
97+ tests .Info (nerdctlOpt )
98+ tests .Events (nerdctlOpt )
99+ tests .Inspect (nerdctlOpt )
100+ tests .NetworkCreate (nerdctlOpt )
101+ tests .NetworkInspect (nerdctlOpt )
102+ tests .NetworkLs (nerdctlOpt )
103+ tests .NetworkRm (nerdctlOpt )
104104 })
105105
106106 gomega .RegisterFailHandler (ginkgo .Fail )
0 commit comments