diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-09-06 14:49:59 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-09-07 13:58:11 +0200 |
commit | d1573b95e3427efae21da784e3112c5fb3d463fb (patch) | |
tree | da311feeab3105d4577a7d5c4a9a1dc3027603aa /pkg/systemd/generate/common_test.go | |
parent | e095667ac8c2ccaf06dea6d4c61f51d93b736968 (diff) | |
download | podman-d1573b95e3427efae21da784e3112c5fb3d463fb.tar.gz podman-d1573b95e3427efae21da784e3112c5fb3d463fb.tar.bz2 podman-d1573b95e3427efae21da784e3112c5fb3d463fb.zip |
generate systemd: handle --restart
Handle custom restart policies of containers when generating the unit
files; those should be set on the unit level and removed from ExecStart
flags.
Fixes: #11438
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/systemd/generate/common_test.go')
-rw-r--r-- | pkg/systemd/generate/common_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/systemd/generate/common_test.go b/pkg/systemd/generate/common_test.go index 80abebb26..45004ecb0 100644 --- a/pkg/systemd/generate/common_test.go +++ b/pkg/systemd/generate/common_test.go @@ -117,12 +117,12 @@ func TestFilterCommonContainerFlags(t *testing.T) { 1, }, { - []string{"podman", "run", "--cgroups=foo", "alpine"}, + []string{"podman", "run", "--cgroups=foo", "--restart=foo", "alpine"}, []string{"podman", "run", "alpine"}, 1, }, { - []string{"podman", "run", "--cgroups=foo", "--rm", "alpine"}, + []string{"podman", "run", "--cgroups=foo", "--rm", "--restart", "foo", "alpine"}, []string{"podman", "run", "alpine"}, 1, }, |