Skip to contentSkip to conversation

tests/search: test searching with a mismatched type

PATCH New Ben Boeckel 1 participant 1 message Aug 29, 2019 Keys/keyrings

lore
Share & tools
lore
#0 lore raw

PATCH v2 12/13 tests/search: test searching with a mismatched type

This should fail because the actually found key has a type mismatch.

---
 tests/keyctl/search/valid/runtest.sh | 5 +++++
 1 file changed, 5 insertions(+)
tests/keyctl/search/valid/runtest.sh +5 -0
index d60ea61..a9912ee 100644
@@ -32,6 +32,11 @@ expect_error ENOKEY
 marker "SEARCH SESSION"
 search_for_key --expect=$keyid @s user lizard
 
+# search the session keyring for the key using the wrong type
+marker "SEARCH SESSION USING WRONG TYPE"
+search_for_key --fail @s keyring lizard $keyring2id
+expect_error ENOKEY
+
 # search the session keyring for the key and attach to second keyring
 marker "SEARCH SESSION AND ATTACH"
 search_for_key --expect=$keyid @s user lizard $keyring2id
Signature · 1 line
2.21.0