github.com/containers/podman/v4@v4.9.4/pkg/machine/e2e/os_test.go (about)

     1  package e2e_test
     2  
     3  // import (
     4  // 	. "github.com/onsi/ginkgo/v2"
     5  // 	. "github.com/onsi/gomega"
     6  // 	. "github.com/onsi/gomega/gexec"
     7  // )
     8  
     9  // var _ = Describe("podman machine os apply", func() {
    10  // 	var (
    11  // 		mb      *machineTestBuilder
    12  // 		testDir string
    13  // 	)
    14  
    15  // 	BeforeEach(func() {
    16  // 		testDir, mb = setup()
    17  // 	})
    18  // 	AfterEach(func() {
    19  // 		teardown(originalHomeDir, testDir, mb)
    20  // 	})
    21  
    22  // 	It("apply machine", func() {
    23  // 		i := new(initMachine)
    24  // 		foo1, err := mb.setName("foo1").setCmd(i.withImagePath(mb.imagePath)).run()
    25  // 		Expect(err).ToNot(HaveOccurred())
    26  // 		Expect(foo1).To(Exit(0))
    27  
    28  // 		apply := new(applyMachineOS)
    29  // 		applySession, err := mb.setName("foo1").setCmd(apply.args([]string{"quay.io/baude/podman_next"})).run()
    30  // 		Expect(err).ToNot(HaveOccurred())
    31  // 		Expect(applySession).To(Exit(0))
    32  // 	})
    33  
    34  // 	It("apply machine from containers-storage", func() {
    35  // 		i := new(initMachine)
    36  // 		foo1, err := mb.setName("foo1").setCmd(i.withImagePath(mb.imagePath)).run()
    37  // 		Expect(err).ToNot(HaveOccurred())
    38  // 		Expect(foo1).To(Exit(0))
    39  
    40  // 		ssh := sshMachine{}
    41  // 		sshSession, err := mb.setName("foo1").setCmd(ssh.withSSHComand([]string{"podman", "pull", "quay.io/baude/podman_next"})).run()
    42  // 		Expect(err).ToNot(HaveOccurred())
    43  // 		Expect(sshSession).To(Exit(0))
    44  
    45  // 		apply := new(applyMachineOS)
    46  // 		applySession, err := mb.setName("foo1").setCmd(apply.args([]string{"quay.io/baude/podman_next"})).run()
    47  // 		Expect(err).ToNot(HaveOccurred())
    48  // 		Expect(applySession).To(Exit(0))
    49  // 		Expect(applySession.outputToString()).To(ContainSubstring("Pulling from: containers-storage"))
    50  // 	})
    51  
    52  // 	It("apply machine not exist", func() {
    53  // 		apply := new(applyMachineOS)
    54  // 		applySession, err := mb.setName("foo1").setCmd(apply.args([]string{"quay.io/baude/podman_next", "notamachine"})).run()
    55  // 		Expect(err).ToNot(HaveOccurred())
    56  // 		Expect(applySession).To(Exit(125))
    57  // 		Expect(applySession.errorToString()).To(ContainSubstring("not exist"))
    58  // 	})
    59  // })