summaryrefslogtreecommitdiff
path: root/pkg/systemd/generate/common_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/systemd/generate/common_test.go')
-rw-r--r--pkg/systemd/generate/common_test.go24
1 files changed, 7 insertions, 17 deletions
diff --git a/pkg/systemd/generate/common_test.go b/pkg/systemd/generate/common_test.go
index fdcc9d21b..3e2ac015f 100644
--- a/pkg/systemd/generate/common_test.go
+++ b/pkg/systemd/generate/common_test.go
@@ -93,22 +93,22 @@ func TestFilterCommonContainerFlags(t *testing.T) {
},
{
[]string{"podman", "run", "--conmon-pidfile", "foo", "alpine"},
- []string{"podman", "run", "alpine"},
+ []string{"podman", "run", "--conmon-pidfile", "foo", "alpine"},
1,
},
{
[]string{"podman", "run", "--conmon-pidfile=foo", "alpine"},
- []string{"podman", "run", "alpine"},
+ []string{"podman", "run", "--conmon-pidfile=foo", "alpine"},
1,
},
{
[]string{"podman", "run", "--cidfile", "foo", "alpine"},
- []string{"podman", "run", "alpine"},
+ []string{"podman", "run", "--cidfile", "foo", "alpine"},
1,
},
{
[]string{"podman", "run", "--cidfile=foo", "alpine"},
- []string{"podman", "run", "alpine"},
+ []string{"podman", "run", "--cidfile=foo", "alpine"},
1,
},
{
@@ -122,25 +122,15 @@ func TestFilterCommonContainerFlags(t *testing.T) {
1,
},
{
- []string{"podman", "run", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo", "alpine"},
+ []string{"podman", "run", "--cgroups=foo", "--rm", "alpine"},
[]string{"podman", "run", "alpine"},
1,
},
{
- []string{"podman", "run", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo", "alpine"},
- []string{"podman", "run", "alpine"},
- 1,
- },
- {
- []string{"podman", "run", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo", "alpine", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo"},
- []string{"podman", "run", "alpine", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo"},
+ []string{"podman", "run", "--cgroups", "--rm=bogus", "alpine", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo", "--rm"},
+ []string{"podman", "run", "alpine", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo", "--rm"},
7,
},
- {
- []string{"podman", "run", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo", "alpine", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo"},
- []string{"podman", "run", "alpine", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo"},
- 4,
- },
}
for _, test := range tests {