diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-11 10:56:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 10:56:11 -0400 |
commit | 39ad0387ca27097875b02b55c6f71c2f2b8bdd6c (patch) | |
tree | 0c870e02eb98c1f1db60d5dd44e7ebf2a7450335 /pkg/systemd/generate/common_test.go | |
parent | f1b6840382ffdfe9811c64b3aea75218d9b14e5e (diff) | |
parent | c7c81a8c081f6f7458345027f315a796d6ca5eda (diff) | |
download | podman-39ad0387ca27097875b02b55c6f71c2f2b8bdd6c.tar.gz podman-39ad0387ca27097875b02b55c6f71c2f2b8bdd6c.tar.bz2 podman-39ad0387ca27097875b02b55c6f71c2f2b8bdd6c.zip |
Merge pull request #6415 from vrothberg/systemd-new-pod
podman-generate-systemd --new for pods
Diffstat (limited to 'pkg/systemd/generate/common_test.go')
-rw-r--r-- | pkg/systemd/generate/common_test.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pkg/systemd/generate/common_test.go b/pkg/systemd/generate/common_test.go new file mode 100644 index 000000000..f53bb7828 --- /dev/null +++ b/pkg/systemd/generate/common_test.go @@ -0,0 +1,25 @@ +package generate + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestFilterPodFlags(t *testing.T) { + + tests := []struct { + input []string + }{ + {[]string{"podman", "pod", "create"}}, + {[]string{"podman", "pod", "create", "--name", "foo"}}, + {[]string{"podman", "pod", "create", "--pod-id-file", "foo"}}, + {[]string{"podman", "run", "--pod", "foo"}}, + } + + for _, test := range tests { + processed := filterPodFlags(test.input) + assert.NotContains(t, processed, "--pod-id-file") + assert.NotContains(t, processed, "--pod") + } +} |