diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-10 22:24:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-10 22:24:43 +0200 |
commit | 997c4b56ed2121726e966afe9a102ed16ba78f93 (patch) | |
tree | 35a0b0a43f9c5b6d484f93564f01a373802e44df /test | |
parent | c1761ba1ac4155bab82fb9b847ccf96489b98265 (diff) | |
parent | b6106341fb3a749ec37e59ee3290257a1729def1 (diff) | |
download | podman-997c4b56ed2121726e966afe9a102ed16ba78f93.tar.gz podman-997c4b56ed2121726e966afe9a102ed16ba78f93.tar.bz2 podman-997c4b56ed2121726e966afe9a102ed16ba78f93.zip |
Merge pull request #3961 from mheon/copy_volume_contents
When first mounting any named volume, copy up
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_volume_test.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index 551e86b93..fc1998ab2 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -249,4 +249,25 @@ var _ = Describe("Podman run with volumes", func() { fmt.Printf("Output: %s", mountOut3) Expect(strings.Contains(mountOut3, volName)).To(BeFalse()) }) + + It("podman named volume copyup", func() { + baselineSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", ALPINE, "ls", "/etc/apk/"}) + baselineSession.WaitWithDefaultTimeout() + Expect(baselineSession.ExitCode()).To(Equal(0)) + baselineOutput := baselineSession.OutputToString() + + inlineVolumeSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", "-v", "testvol1:/etc/apk", ALPINE, "ls", "/etc/apk/"}) + inlineVolumeSession.WaitWithDefaultTimeout() + Expect(inlineVolumeSession.ExitCode()).To(Equal(0)) + Expect(inlineVolumeSession.OutputToString()).To(Equal(baselineOutput)) + + makeVolumeSession := podmanTest.Podman([]string{"volume", "create", "testvol2"}) + makeVolumeSession.WaitWithDefaultTimeout() + Expect(makeVolumeSession.ExitCode()).To(Equal(0)) + + separateVolumeSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", "-v", "testvol2:/etc/apk", ALPINE, "ls", "/etc/apk/"}) + separateVolumeSession.WaitWithDefaultTimeout() + Expect(separateVolumeSession.ExitCode()).To(Equal(0)) + Expect(separateVolumeSession.OutputToString()).To(Equal(baselineOutput)) + }) }) |