summaryrefslogtreecommitdiff
path: root/cmd/podman/create_cli_test.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-01-12 10:19:48 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-15 19:27:10 +0000
commit2bfb31ddf4b7f28a67ef94b8b318536c367a663b (patch)
treef76fca0eb6087cc4d5c3b65dc06b73113fe588d9 /cmd/podman/create_cli_test.go
parent7853262a84b1312e29a78708865a28bd41c4cc2f (diff)
downloadpodman-2bfb31ddf4b7f28a67ef94b8b318536c367a663b.tar.gz
podman-2bfb31ddf4b7f28a67ef94b8b318536c367a663b.tar.bz2
podman-2bfb31ddf4b7f28a67ef94b8b318536c367a663b.zip
Implement and test the following flags for podman run and create
memory, memory-reservation, memory-swap, memory-swappiness, kernel-memory, cpu-period, cou-quota, cpu-shares, cpus, cpuset-cpus, cpuset-mems, blkio-weight, blkio-weight-device, sysctl, and ulimit Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #221 Approved by: mheon
Diffstat (limited to 'cmd/podman/create_cli_test.go')
-rw-r--r--cmd/podman/create_cli_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/podman/create_cli_test.go b/cmd/podman/create_cli_test.go
index 63a1e5dd3..fa128c8e6 100644
--- a/cmd/podman/create_cli_test.go
+++ b/cmd/podman/create_cli_test.go
@@ -28,15 +28,15 @@ func createTmpFile(content []byte) (string, error) {
return tmpfile.Name(), nil
}
-func TestConvertStringSliceToMap(t *testing.T) {
- strSlice := []string{"BLAU=BLUE", "GELB=YELLOW"}
- result, _ := convertStringSliceToMap(strSlice, "=")
- assert.Equal(t, result["BLAU"], "BLUE")
+func TestValidateSysctl(t *testing.T) {
+ strSlice := []string{"net.core.test1=4", "kernel.msgmax=2"}
+ result, _ := validateSysctl(strSlice)
+ assert.Equal(t, result["net.core.test1"], "4")
}
-func TestConvertStringSliceToMapBadData(t *testing.T) {
+func TestValidateSysctlBadSysctl(t *testing.T) {
strSlice := []string{"BLAU=BLUE", "GELB^YELLOW"}
- _, err := convertStringSliceToMap(strSlice, "=")
+ _, err := validateSysctl(strSlice)
assert.Error(t, err)
}