mirror of
https://github.com/containers/podman.git
synced 2025-11-29 09:37:38 +08:00
Use fake images for machine tests
In tests that do not start a machine, we can use "fake" images to speed up tests. In the case of darwin and Linux, that can be /dev/null. The hypervisors don't care. In the case of Windows, some research will need to be done to determine the same approach but this is a start. Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@@ -18,7 +18,7 @@ var _ = Describe("podman machine reset", func() {
|
||||
It("reset machine with one defined machine", func() {
|
||||
name := randomString()
|
||||
i := new(initMachine)
|
||||
session, err := mb.setName(name).setCmd(i.withImage(mb.imagePath)).run()
|
||||
session, err := mb.setName(name).setCmd(i.withFakeImage(mb)).run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(session).To(Exit(0))
|
||||
|
||||
@@ -54,7 +54,7 @@ var _ = Describe("podman machine reset", func() {
|
||||
|
||||
name2 := randomString()
|
||||
i2 := new(initMachine)
|
||||
session2, err := mb.setName(name2).setCmd(i2.withImage(mb.imagePath)).run()
|
||||
session2, err := mb.setName(name2).setCmd(i2.withFakeImage(mb)).run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(session2).To(Exit(0))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user