Skip to content

Commit

Permalink
fix: vm e2e tests nerdctl v1.5
Browse files Browse the repository at this point in the history
nerdctl v1.5 introduced a change to output of container list operation
where container names are returned as a list/slice object rather than
string.

Signed-off-by: Gavin Inglis <[email protected]>
  • Loading branch information
ginglis13 committed Aug 8, 2023
1 parent d26455d commit cbeb40f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions e2e/vm/additional_disk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ const (
)

var testAdditionalDisk = func(o *option.Option) {
ginkgo.BeforeEach(func() {
command.RemoveAll(o)
})
ginkgo.Describe("Additional disk", ginkgo.Serial, func() {
ginkgo.It("Retains container user data after the VM is deleted", func() {
command.Run(o, "volume", "create", volumeName)
ginkgo.DeferCleanup(command.Run, o, "volume", "rm", volumeName)
command.Run(o, "network", "create", networkName)
ginkgo.DeferCleanup(command.Run, o, "network", "rm", networkName)
Expand All @@ -42,8 +44,9 @@ var testAdditionalDisk = func(o *option.Option) {
imageOutput := command.StdoutAsLines(o, "images", "--format", "{{.Name}}")
gomega.Expect(imageOutput).Should(gomega.ContainElement(savedImage))

// Changed in nerdctl v1.5 to [<name>] https://github.com/containerd/nerdctl/commit/11d80f274257c064924f40bd007756110d863a16
psOutput := command.StdoutAsLines(o, "ps", "--all", "--format", "{{.Names}}")
gomega.Expect(psOutput).Should(gomega.ContainElement(containerName))
gomega.Expect(psOutput).Should(gomega.ContainElement("[" + containerName + "]"))

volumeOutput := command.StdoutAsLines(o, "volume", "ls", "--format", "{{.Name}}")
gomega.Expect(volumeOutput).Should(gomega.ContainElement(volumeName))
Expand Down

0 comments on commit cbeb40f

Please sign in to comment.