diff options
author | umohnani8 <umohnani@redhat.com> | 2018-02-05 10:42:14 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-06 19:31:55 +0000 |
commit | 367213a3943961126c6f7c1dce45c7fafea9e6b2 (patch) | |
tree | 758846f65e55f4f005b03fbfd5d81933db6cf437 /test | |
parent | 69d75a82515b6b4270cd6b72617cff1531f9ceca (diff) | |
download | podman-367213a3943961126c6f7c1dce45c7fafea9e6b2.tar.gz podman-367213a3943961126c6f7c1dce45c7fafea9e6b2.tar.bz2 podman-367213a3943961126c6f7c1dce45c7fafea9e6b2.zip |
Match podman inspect output to docker inspect
Made a change to make sure that the output paths of podman inspect
matches that of docker inspect. For example to get the stop signal
you should be able to do podman inspect ctr --format {{.Config.StopSignal}}
and the same thing in docker will give the same results.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #292
Approved by: rhatdan
Diffstat (limited to 'test')
-rwxr-xr-x | test/demos.sh | 93 | ||||
-rw-r--r-- | test/e2e/create_test.go | 2 | ||||
-rw-r--r-- | test/e2e/inspect_test.go | 5 |
3 files changed, 97 insertions, 3 deletions
diff --git a/test/demos.sh b/test/demos.sh new file mode 100755 index 000000000..4ce29e160 --- /dev/null +++ b/test/demos.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +echo "This is a demo of the podman search command." +echo "" + +read -p "--> cat /etc/containers/registries.conf" +cat /etc/containers/registries.conf +echo "" + +read -p "--> podman search fedora" +podman search fedora +echo "" + +read -p "--> podman search --filter stars=34 fedora" +podman search --filter stars=34 fedora +echo "" + +read -p "--> podman search --filter is-automated=false --filter stars=34 --filter is-official fedora" +podman search --filter is-automated=false --filter stars=34 --filter is-official fedora +echo "" + +read -p "--> podman search --no-trunc --limit 3 fedora" +podman search --no-trunc --limit 3 fedora +echo "" + +read -p "--> podman search --registry registry.access.redhat.com rhel7" +podman search --registry registry.access.redhat.com rhel7 +echo "" + +read -p "--> podman search --format \"table {{.Name}} {{.Description}}\" fedora" +podman search --format "table {{.Name}} {{.Description}}" fedora +echo "" + +read -p "Demo of a few podman run and create options" +echo "" + +read -p "--> podman run --memory 80m fedora cat /sys/fs/cgroup/memory/memory.limit_in_bytes" +podman run --rm --memory 80m fedora cat /sys/fs/cgroup/memory/memory.limit_in_bytes +echo "" + +read -p "--> podman run --memory 80m --memory-reservation 40m fedora cat /sys/fs/cgroup/memory/memory.soft_limit_in_bytes" +podman run --rm --memory 80m --memory-reservation 40m fedora cat /sys/fs/cgroup/memory/memory.soft_limit_in_bytes +echo "" + +read -p "--> podman run --memory 40m --memory-reservation 80m fedora cat /sys/fs/cgroup/memory/memory.soft_limit_in_bytes" +podman run --rm --memory 40m --memory-reservation 80m fedora cat /sys/fs/cgroup/memory/memory.soft_limit_in_bytes +echo "" + +read -p "--> podman run --memory-swappiness 15 fedora cat /sys/fs/cgroup/memory/memory.swappiness" +podman run --rm --memory-swappiness 15 fedora cat /sys/fs/cgroup/memory/memory.swappiness +echo "" + +read -p "--> podman run --kernel-memory 40m fedora cat /sys/fs/cgroup/memory/memory.kmem.limit_in_bytes" +podman run --rm --kernel-memory 40m fedora cat /sys/fs/cgroup/memory/memory.kmem.limit_in_bytes +echo "" + +read -p "--> podman run --cpu-period 5000 fedora cat /sys/fs/cgroup/cpu/cpu.cfs_period_us" +podman run --rm --cpu-period 5000 fedora cat /sys/fs/cgroup/cpu/cpu.cfs_period_us +echo "" + +read -p "--> podman run --cpu-quota 15000 --cpu-period 5000 fedora cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us" +podman run --rm --cpu-quota 15000 --cpu-period 5000 fedora cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us +echo "" + +read -p "--> podman run --cpus 0.5 fedora /bin/bash" +read -p "cat /sys/fs/cgroup/cpu/cpu.cfs_period_us" +podman run --rm --cpus 0.5 fedora cat /sys/fs/cgroup/cpu/cpu.cfs_period_us +read -p "cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us" +podman run --rm --cpus 0.5 fedora cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us +echo "" + +read -p "--> podman run --cpu-shares 2 fedora cat /sys/fs/cgroup/cpu/cpu.shares" +podman run --rm --cpu-shares 2 fedora cat /sys/fs/cgroup/cpu/cpu.shares +echo "" + +read -p "--> podman run --cpuset-cpus=0,2 fedora cat /sys/fs/cgroup/cpuset/cpuset.cpus" +podman run --rm --cpuset-cpus=0,2 fedora cat /sys/fs/cgroup/cpuset/cpuset.cpus +echo "" + +read -p "--> podman run --sysctl net.core.somaxconn=65535 alpine sysctl net.core.somaxconn" +podman run --rm --sysctl net.core.somaxconn=65535 alpine sysctl net.core.somaxconn +echo "" + +read -p "--> podman run --ulimit nofile=1024:1028 fedora ulimit -n" +podman run --rm --ulimit nofile=1024:1028 fedora ulimit -n +echo "" + +read -p "--> podman run --blkio-weight 15 fedora cat /sys/fs/cgroup/blkio/blkio.weight" +podman run --rm --blkio-weight 15 fedora cat /sys/fs/cgroup/blkio/blkio.weight +echo "" + +read -p "End of Demo." +echo "Thank you!"
\ No newline at end of file diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go index c116cea7d..e54e35761 100644 --- a/test/e2e/create_test.go +++ b/test/e2e/create_test.go @@ -38,7 +38,7 @@ var _ = Describe("Podman create", func() { check := podmanTest.Podman([]string{"inspect", "-l"}) check.WaitWithDefaultTimeout() data := check.InspectContainerToJSON() - Expect(data.CtrInspectData.ID).To(ContainSubstring(cid)) + Expect(data.ID).To(ContainSubstring(cid)) }) It("podman create container based on a remote image", func() { diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go index b22774575..b6020f53b 100644 --- a/test/e2e/inspect_test.go +++ b/test/e2e/inspect_test.go @@ -3,9 +3,10 @@ package integration import ( "os" + "strings" + . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "strings" ) var _ = Describe("Podman inspect", func() { @@ -69,6 +70,6 @@ var _ = Describe("Podman inspect", func() { result.WaitWithDefaultTimeout() Expect(result.ExitCode()).To(Equal(0)) conData := result.InspectContainerToJSON() - Expect(conData.CtrInspectData.SizeRootFs).To(BeNumerically(">", 0)) + Expect(conData.SizeRootFs).To(BeNumerically(">", 0)) }) }) |