Skip to content

Commit

Permalink
fix opt
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Alvarez <[email protected]>
  • Loading branch information
pendo324 committed Mar 27, 2024
1 parent 4d9f148 commit 64806dd
Showing 1 changed file with 53 additions and 54 deletions.
107 changes: 53 additions & 54 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,68 +42,67 @@ func TestE2e(t *testing.T) {
vmName := "fedora"
o, err := option.New([]string{subject})

ginkgo.SynchronizedBeforeSuite(func() []byte {
ginkgo.SynchronizedBeforeSuite(func() *option.Option {
command.New(o, "start", vmConfigFile).WithTimeoutInSeconds(600).Run()
opt, err := option.New([]string{subject, "shell", "fedora", "sudo", "-E", "nerdctl"})
if err != nil {
t.Fatalf("failed to initialize a testing option: %v", err)
}
tests.SetupLocalRegistry(o)
return nil
}, func(bytes []byte) {})
return opt
}, func(opt *option.Option) {
ginkgo.Describe(description, func() {
// TODO: add more e2e tests and make them work.
tests.Save(opt)
tests.Load(opt)
tests.Pull(opt)
tests.Rm(opt)
tests.Rmi(opt)
tests.Start(opt)
tests.Stop(opt)
tests.Cp(opt)
tests.Tag(opt)
tests.Build(opt)
tests.Push(opt)
tests.Images(opt)
tests.ComposeBuild(opt)
tests.ComposeDown(opt)
tests.ComposeKill(opt)
tests.ComposePs(opt)
tests.ComposePull(opt)
tests.ComposeLogs(opt)
tests.Create(opt)
tests.Port(opt)
tests.Kill(opt)
tests.Stats(opt)
tests.BuilderPrune(opt)
tests.Exec(opt)
tests.Logs(opt)
tests.Login(opt)
tests.Logout(opt)
tests.VolumeCreate(opt)
tests.VolumeInspect(opt)
tests.VolumeLs(opt)
tests.VolumeRm(opt)
tests.VolumePrune(opt)
tests.ImageHistory(opt)
tests.ImageInspect(opt)
tests.ImagePrune(opt)
tests.Info(opt)
tests.Events(opt)
tests.Inspect(opt)
tests.NetworkCreate(opt)
tests.NetworkInspect(opt)
tests.NetworkLs(opt)
tests.NetworkRm(opt)
})
})

ginkgo.SynchronizedAfterSuite(func() {
command.New(o, "stop", vmName).WithTimeoutInSeconds(90).Run()
command.New(o, "remove", vmName).WithTimeoutInSeconds(60).Run()
}, func() {})

opt, err := option.New([]string{subject, "shell", "fedora", "sudo", "-E", "nerdctl"})
if err != nil {
t.Fatalf("failed to initialize a testing option: %v", err)
}

ginkgo.Describe(description, func() {
// TODO: add more e2e tests and make them work.
tests.Save(opt)
tests.Load(opt)
tests.Pull(opt)
tests.Rm(opt)
tests.Rmi(opt)
tests.Start(opt)
tests.Stop(opt)
tests.Cp(opt)
tests.Tag(opt)
tests.Build(opt)
tests.Push(opt)
tests.Images(opt)
tests.ComposeBuild(opt)
tests.ComposeDown(opt)
tests.ComposeKill(opt)
tests.ComposePs(opt)
tests.ComposePull(opt)
tests.ComposeLogs(opt)
tests.Create(opt)
tests.Port(opt)
tests.Kill(opt)
tests.Stats(opt)
tests.BuilderPrune(opt)
tests.Exec(opt)
tests.Logs(opt)
tests.Login(opt)
tests.Logout(opt)
tests.VolumeCreate(opt)
tests.VolumeInspect(opt)
tests.VolumeLs(opt)
tests.VolumeRm(opt)
tests.VolumePrune(opt)
tests.ImageHistory(opt)
tests.ImageInspect(opt)
tests.ImagePrune(opt)
tests.Info(opt)
tests.Events(opt)
tests.Inspect(opt)
tests.NetworkCreate(opt)
tests.NetworkInspect(opt)
tests.NetworkLs(opt)
tests.NetworkRm(opt)
})

gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, description)
}

0 comments on commit 64806dd

Please sign in to comment.