@@ -117,6 +117,11 @@ var _ = Describe("podman machine init", func() {
117117Expect (testMachine .Resources .CPUs ).To (Equal (uint64 (cpus )))
118118Expect (testMachine .Resources .Memory ).To (BeEquivalentTo (uint64 (2048 )))
119119}
120+ // creating a new VM with the same name must fail
121+ repeatSession ,err := mb .setCmd (i .withImage (mb .imagePath )).run ()
122+ Expect (err ).ToNot (HaveOccurred ())
123+ Expect (repeatSession ).To (Exit (125 ))
124+ Expect (repeatSession .errorToString ()).To (ContainSubstring (fmt .Sprintf ("Error: machine %q already exists" ,mb .names [0 ])))
120125})
121126
122127It ("run playbook" ,func () {
@@ -655,7 +660,6 @@ var _ = Describe("podman machine init", func() {
655660session ,err := mb .setName (machineName ).setCmd (i .withImage (mb .imagePath ).withProvider (providerOverride )).run ()
656661Expect (err ).ToNot (HaveOccurred ())
657662Expect (session .errorToString ()).To (ContainSubstring (fmt .Sprintf ("unsupported provider %q" ,providerOverride )))
658-
659663})
660664
661665It ("machine init --provider" ,func () {
@@ -699,7 +703,6 @@ var _ = Describe("podman machine init", func() {
699703Expect (p ).To (Equal (l .VMType ))
700704}
701705})
702-
703706})
704707
705708var p4Config = []byte (`{