Change image-path to image for tests

As we deprecate image-path for image.

Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
Ashley Cui
2024-02-28 01:18:40 -05:00
parent 527b3793b8
commit 2b86ab5a1e
15 changed files with 57 additions and 57 deletions

View File

@@ -33,7 +33,7 @@ var _ = Describe("podman machine init - windows only", func() {
}
i := new(initMachine)
name := randomString()
session, err := mb.setName(name).setCmd(i.withImagePath(mb.imagePath).withUserModeNetworking(true)).run()
session, err := mb.setName(name).setCmd(i.withImage(mb.imagePath).withUserModeNetworking(true)).run()
Expect(err).ToNot(HaveOccurred())
Expect(session).To(Exit(0))
@@ -86,7 +86,7 @@ var _ = Describe("podman machine init - windows only", func() {
}
}()
i := new(initMachine)
session, err := mb.setName(name).setCmd(i.withImagePath(mb.imagePath)).run()
session, err := mb.setName(name).setCmd(i.withImage(mb.imagePath)).run()
Expect(err).ToNot(HaveOccurred())
Expect(session).To(Exit(125))
Expect(session.errorToString()).To(ContainSubstring("already exists on hypervisor"))
@@ -104,7 +104,7 @@ var _ = Describe("podman machine init - windows only", func() {
// create a bogus machine
i := new(initMachine)
session, err := mb.setName("foobarexport").setCmd(i.withImagePath(mb.imagePath)).run()
session, err := mb.setName("foobarexport").setCmd(i.withImage(mb.imagePath)).run()
Expect(err).ToNot(HaveOccurred())
Expect(session).To(Exit(0))
@@ -129,7 +129,7 @@ var _ = Describe("podman machine init - windows only", func() {
}()
// Trying to make a vm with the same name as an existing name should result in a 125
checkSession, err := mb.setName(name).setCmd(i.withImagePath(mb.imagePath)).run()
checkSession, err := mb.setName(name).setCmd(i.withImage(mb.imagePath)).run()
Expect(err).ToNot(HaveOccurred())
Expect(checkSession).To(Exit(125))
})