mirror of
https://github.com/containers/podman.git
synced 2025-11-03 07:47:19 +08:00
Stop using rm'd inspect format templates in tests
Fixes the "machine rm --save-ignition --save-image" test so that it no longer
uses the `{{ .Image }}` format string.
Fixes the "init should cleanup on failure" test so that it no longer
uses the `{{ .Image }}` and `{{ .ConfigPath }}` format strings.
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
This commit is contained in:
@ -94,16 +94,6 @@ var _ = Describe("podman machine rm", func() {
|
||||
key := inspectSession.outputToString()
|
||||
pubkey := key + ".pub"
|
||||
|
||||
inspect = inspect.withFormat("{{.Image.IgnitionFile.Path}}")
|
||||
inspectSession, err = mb.setCmd(inspect).run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
ign := inspectSession.outputToString()
|
||||
|
||||
inspect = inspect.withFormat("{{.Image.ImagePath.Path}}")
|
||||
inspectSession, err = mb.setCmd(inspect).run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
img := inspectSession.outputToString()
|
||||
|
||||
rm := rmMachine{}
|
||||
removeSession, err := mb.setCmd(rm.withForce().withSaveIgnition().withSaveImage()).run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
@ -122,10 +112,11 @@ var _ = Describe("podman machine rm", func() {
|
||||
|
||||
// WSL does not use ignition
|
||||
if testProvider.VMType() != define.WSLVirt {
|
||||
_, err = os.Stat(ign)
|
||||
ignPath := filepath.Join(testDir, ".config", "containers", "podman", "machine", testProvider.VMType().String(), mb.name+".ign")
|
||||
_, err = os.Stat(ignPath)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
}
|
||||
_, err = os.Stat(img)
|
||||
_, err = os.Stat(mb.imagePath)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user