mirror of
https://github.com/containers/podman.git
synced 2025-10-16 02:32:55 +08:00
Add tests to make sure podman container and podman image commands work
We have little to no testing to make sure we don't break podman image and podman container commands that wrap traditional commands. This PR adds tests for each of the commands. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -50,6 +50,22 @@ var _ = Describe("Podman export", func() {
|
||||
Expect(err).To(BeNil())
|
||||
})
|
||||
|
||||
It("podman container export output flag", func() {
|
||||
SkipIfRemote()
|
||||
_, ec, cid := podmanTest.RunLsContainer("")
|
||||
Expect(ec).To(Equal(0))
|
||||
|
||||
outfile := filepath.Join(podmanTest.TempDir, "container.tar")
|
||||
result := podmanTest.Podman([]string{"container", "export", "-o", outfile, cid})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(result.ExitCode()).To(Equal(0))
|
||||
_, err := os.Stat(outfile)
|
||||
Expect(err).To(BeNil())
|
||||
|
||||
err = os.Remove(outfile)
|
||||
Expect(err).To(BeNil())
|
||||
})
|
||||
|
||||
It("podman export bad filename", func() {
|
||||
_, ec, cid := podmanTest.RunLsContainer("")
|
||||
Expect(ec).To(Equal(0))
|
||||
|
Reference in New Issue
Block a user