From 7da84cc154e0d251428ba8f63f2b0f438a718f86 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Tue, 30 Apr 2024 21:55:05 +0800 Subject: [PATCH] test-execute: ExecStop= and friends should not get credentials See #32583 (cherry picked from commit 60b218e36e96236e6ba386686f130fe34d3e1c2a) --- test/test-execute/exec-set-credential.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-execute/exec-set-credential.service b/test/test-execute/exec-set-credential.service index 22634361cb3..7f2e87f6584 100644 --- a/test/test-execute/exec-set-credential.service +++ b/test/test-execute/exec-set-credential.service @@ -5,7 +5,7 @@ Description=Test for SetCredential= [Service] ExecStart=sh -x -c 'test "$$(cat %d/test-execute.set-credential)" = "hoge"' ExecStartPost=sh -x -c 'test "$$(cat %d/test-execute.set-credential)" = "hoge"' -ExecStop=sh -x -c 'test "$$(cat %d/test-execute.set-credential)" = "hoge"' -ExecStopPost=sh -x -c 'test "$$(cat %d/test-execute.set-credential)" = "hoge"' +ExecStop=bash -x -c '[[ ! -v CREDENTIALS_DIRECTORY ]]' +ExecStopPost=bash -x -c '[[ ! -v CREDENTIALS_DIRECTORY ]]' Type=oneshot SetCredential=test-execute.set-credential:hoge