From 1760716959644bfa12919369645129535a56d2a0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 24 Nov 2023 16:30:15 +0100 Subject: [PATCH] test: add simple creds/varlink integration test --- test/units/testsuite-54.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/units/testsuite-54.sh b/test/units/testsuite-54.sh index bcbe7a1e6a9..c7d11cffe6e 100755 --- a/test/units/testsuite-54.sh +++ b/test/units/testsuite-54.sh @@ -314,6 +314,16 @@ if ! systemd-detect-virt -q -c ; then systemctl -P Wants show getty.target | grep -q container-getty@idontexist.service fi +# Decrypt/encrypt via varlink + +echo -n '{"data":"Zm9vYmFyCg=="}' > /tmp/vlcredsdata + +varlinkctl call /run/systemd/io.systemd.Credentials io.systemd.Credentials.Encrypt "$(cat /tmp/vlcredsdata)" | \ + varlinkctl call /run/systemd/io.systemd.Credentials io.systemd.Credentials.Decrypt > /tmp/vlcredsdata2 + +cmp /tmp/vlcredsdata /tmp/vlcredsdata2 +rm /tmp/vlcredsdata /tmp/vlcredsdata2 + systemd-analyze log-level info touch /testok -- 2.47.3