diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-04-26 14:57:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 14:57:13 +0200 |
commit | 947579e5e253c08592d30494e980db6d7211b7a9 (patch) | |
tree | b4922ad8ac7ce84bb70b77953d85c39727be8474 /src/test | |
parent | d21d71fb285ebd4726536159c4ccaa08b7046215 (diff) | |
parent | 1c7ed99027feeb16433ec2e1b558326ffb93923b (diff) | |
download | systemd-947579e5e253c08592d30494e980db6d7211b7a9.tar.gz |
Merge pull request #27408 from keszybz/creds-missing-message
Adjust messages when credentials are missing
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-creds.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test-creds.c b/src/test/test-creds.c index 44022e7324..25b0c34a59 100644 --- a/src/test/test-creds.c +++ b/src/test/test-creds.c @@ -16,7 +16,7 @@ TEST(read_credential_strings) { if (e) assert_se(saved = strdup(e)); - assert_se(read_credential_strings_many("foo", &x, "bar", &y) == -ENXIO); + assert_se(read_credential_strings_many("foo", &x, "bar", &y) == 0); assert_se(x == NULL); assert_se(y == NULL); @@ -24,20 +24,20 @@ TEST(read_credential_strings) { assert_se(setenv("CREDENTIALS_DIRECTORY", tmp, /* override= */ true) >= 0); - assert_se(read_credential_strings_many("foo", &x, "bar", &y) == -ENOENT); + assert_se(read_credential_strings_many("foo", &x, "bar", &y) == 0); assert_se(x == NULL); assert_se(y == NULL); assert_se(p = path_join(tmp, "bar")); assert_se(write_string_file(p, "piff", WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_AVOID_NEWLINE) >= 0); - assert_se(read_credential_strings_many("foo", &x, "bar", &y) == -ENOENT); + assert_se(read_credential_strings_many("foo", &x, "bar", &y) == 0); assert_se(x == NULL); assert_se(streq(y, "piff")); assert_se(write_string_file(p, "paff", WRITE_STRING_FILE_TRUNCATE|WRITE_STRING_FILE_AVOID_NEWLINE) >= 0); - assert_se(read_credential_strings_many("foo", &x, "bar", &y) == -ENOENT); + assert_se(read_credential_strings_many("foo", &x, "bar", &y) == 0); assert_se(x == NULL); assert_se(streq(y, "piff")); |