summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorcdoern <cbdoer23@g.holycross.edu>2022-04-13 18:38:02 -0400
committercdoern <cdoern@redhat.com>2022-04-14 10:40:29 -0400
commitf38b03d3752aa2a8fe1172b50b73cd5a33ae14ea (patch)
tree6c3a6ef4a1fa84c53b0d1a3a21d7775effa404d7 /test/e2e
parent9822c46981226c3296b5ad7833d8937cfc3ece49 (diff)
downloadpodman-f38b03d3752aa2a8fe1172b50b73cd5a33ae14ea.tar.gz
podman-f38b03d3752aa2a8fe1172b50b73cd5a33ae14ea.tar.bz2
podman-f38b03d3752aa2a8fe1172b50b73cd5a33ae14ea.zip
Fix Memory Swappiness passing in Container Clone
`DefineCreateFlags` was excluding clone from using the memory-swappiness flag leading the value to be zero when our deafult is -1. Rearrange the if/else to give clone these memory related options resolves #13856 Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/container_clone_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/container_clone_test.go b/test/e2e/container_clone_test.go
index a327bb8ed..1d5944d1a 100644
--- a/test/e2e/container_clone_test.go
+++ b/test/e2e/container_clone_test.go
@@ -146,6 +146,20 @@ var _ = Describe("Podman container clone", func() {
cloneData = cloneInspect.InspectContainerToJSON()
Expect(createData[0].HostConfig.NanoCpus).ToNot(Equal(cloneData[0].HostConfig.NanoCpus))
Expect(cloneData[0].HostConfig.NanoCpus).To(Equal(nanoCPUs))
+
+ create = podmanTest.Podman([]string{"create", ALPINE})
+ create.WaitWithDefaultTimeout()
+ Expect(create).To(Exit(0))
+ clone = podmanTest.Podman([]string{"container", "clone", "--cpus=4", create.OutputToString()})
+ clone.WaitWithDefaultTimeout()
+ Expect(clone).To(Exit(0))
+
+ cloneInspect = podmanTest.Podman([]string{"inspect", clone.OutputToString()})
+ cloneInspect.WaitWithDefaultTimeout()
+ Expect(cloneInspect).To(Exit(0))
+ cloneData = cloneInspect.InspectContainerToJSON()
+ Expect(cloneData[0].HostConfig.MemorySwappiness).To(Equal(int64(0)))
+
})
It("podman container clone in a pod", func() {