mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
vmtypes names cannot be used as machine names
florent found a bug where he used "applehv" as a machine name. it turns out when we use a vmtype name, esp. the active type, it really messes up directory structures for configuration and images alike. Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -41,6 +41,12 @@ var _ = Describe("podman machine init", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(session).To(Exit(125))
|
||||
|
||||
reservedName := initMachine{}
|
||||
reservedNameSession, err := mb.setName(testProvider.VMType().String()).setCmd(&reservedName).run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(reservedNameSession).To(Exit(125))
|
||||
Expect(reservedNameSession.errorToString()).To(ContainSubstring(fmt.Sprintf("cannot use %q", testProvider.VMType().String())))
|
||||
|
||||
badName := "foobar"
|
||||
bm := basicMachine{}
|
||||
sysConn, err := mb.setCmd(bm.withPodmanCommand([]string{"system", "connection", "add", badName, "tcp://localhost:8000"})).run()
|
||||
|
Reference in New Issue
Block a user