]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-54-CREDS: s/ImportCredentialEx/ImportCredential/ except for one place
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 27 Jun 2025 13:48:55 +0000 (15:48 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 3 Jul 2025 08:37:34 +0000 (10:37 +0200)
This is a separate commit because the tests are supposed to pass with both
the old spelling and the new.

test/units/TEST-54-CREDS.sh

index dae8d6a2429a981a74ea7225796f07dc23a5e1ea..7016aee85a3fcbbd0862cda52b938cf827c8dac1 100755 (executable)
@@ -334,7 +334,7 @@ systemd-run -p "ImportCredential=test.creds.*" \
             test ! -e '${CREDENTIALS_DIRECTORY}/test.creds.hoge:invalid'
 
 # Check if credentials with invalid names are not imported (with renaming).
-systemd-run -p "ImportCredentialEx=test.creds.*:renamed.creds." \
+systemd-run -p "ImportCredential=test.creds.*:renamed.creds." \
             --unit=test-54-ImportCredential.service \
             -p DynamicUser=1 \
             --wait \
@@ -352,8 +352,8 @@ systemd-run -p "ImportCredential=test.creds.*" \
                 '${CREDENTIALS_DIRECTORY}/test.creds.third' >/tmp/ts54-concat
 cmp /tmp/ts54-concat <(echo -n abc)
 
-# Check that ImportCredentialEx= works without renaming.
-systemd-run -p "ImportCredentialEx=test.creds.*" \
+# Check that ImportCredential= works without renaming.
+systemd-run -p "ImportCredential=test.creds.*" \
             --unit=test-54-ImportCredential.service \
             -p DynamicUser=1 \
             --wait \
@@ -364,7 +364,7 @@ systemd-run -p "ImportCredentialEx=test.creds.*" \
 cmp /tmp/ts54-concat <(echo -n abc)
 
 # Check that renaming with globs works as expected.
-systemd-run -p "ImportCredentialEx=test.creds.*:renamed.creds." \
+systemd-run -p "ImportCredential=test.creds.*:renamed.creds." \
             --unit=test-54-ImportCredential.service \
             -p DynamicUser=1 \
             --wait \
@@ -375,7 +375,7 @@ systemd-run -p "ImportCredentialEx=test.creds.*:renamed.creds." \
 cmp /tmp/ts54-concat <(echo -n abc)
 
 # Check that renaming without globs works as expected.
-systemd-run -p "ImportCredentialEx=test.creds.first:renamed.creds.first" \
+systemd-run -p "ImportCredential=test.creds.first:renamed.creds.first" \
             --unit=test-54-ImportCredential.service \
             -p DynamicUser=1 \
             --wait \
@@ -384,8 +384,8 @@ systemd-run -p "ImportCredentialEx=test.creds.first:renamed.creds.first" \
 cmp /tmp/ts54-concat <(echo -n a)
 
 # Test that multiple renames are processed in the correct order.
-systemd-run -p "ImportCredentialEx=test.creds.first:renamed.creds.first" \
-            -p "ImportCredentialEx=test.creds.second:renamed.creds.first" \
+systemd-run -p "ImportCredential=test.creds.first:renamed.creds.first" \
+            -p "ImportCredential=test.creds.second:renamed.creds.first" \
             --unit=test-54-ImportCredential.service \
             -p DynamicUser=1 \
             --wait \
@@ -394,6 +394,7 @@ systemd-run -p "ImportCredentialEx=test.creds.first:renamed.creds.first" \
 cmp /tmp/ts54-concat <(echo -n a)
 
 # Test that a credential can be imported multiple times with different names.
+# We use the deprecated name ImportCredentialEx= on purpose to check that it works.
 systemd-run -p "ImportCredentialEx=test.creds.first" \
             -p "ImportCredentialEx=test.creds.first:renamed.creds.first" \
             -p "ImportCredentialEx=test.creds.first:renamed.creds.second" \