mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-14 06:06:44 +00:00
Remove dependence on keyring list order
This commit is contained in:
parent
26e38e79cb
commit
7f6316b7df
@ -71,20 +71,11 @@ test_keyringList() {
|
||||
executeJavaOk org.servalproject.test.Keyring list-identities
|
||||
tfw_cat --stdout --stderr
|
||||
assertStdoutLineCount == $IDENTITY_COUNT
|
||||
# TODO: these tests only work because the listed order of identities is the
|
||||
# order of creation, which makes locked identities easy to attack. When the
|
||||
# random search TODO in keyring.c:find_free_slot() is done, then these tests
|
||||
# should fail.
|
||||
for ((n = 1; n != IDENTITY_COUNT + 1; ++n)); do
|
||||
line="$(sed -n -e ${n}p "$TFWSTDOUT")"
|
||||
unset_vars_with_prefix XX_
|
||||
unpack_vars XX_ "$line"
|
||||
local sidvar=SIDA$n
|
||||
local didvar=DIDA$n
|
||||
local namevar=NAMEA$n
|
||||
assert [ "$XX_sid" = "${!sidvar}" ]
|
||||
assert [ "$XX_did" = "${!didvar-null}" ]
|
||||
assert [ "$XX_name" = "${!namevar-null}" ]
|
||||
assertStdoutGrep --matches=1 "^sid=${!sidvar}, did=${!didvar-null}, name=${!namevar-null}$"
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user