3
. ../../../prepare.inc.sh
4
. ../../../toolbox.inc.sh
7
# ---- do the actual testing ----
10
echo "++++ BEGINNING TEST" >$OUTPUTFILE
12
# create a keyring and attach it to the session keyring
14
create_keyring wibble @s
15
expect_keyid keyringid
17
# check that we have an empty keyring
19
list_keyring $keyringid
20
expect_keyring_rlist rlist empty
22
# stick a key in the keyring
24
create_key user lizard gizzard $keyringid
27
# check that we can list it
28
marker "LIST KEYRING 2"
29
list_keyring $keyringid
30
expect_keyring_rlist rlist $keyid
33
marker "INVALIDATE KEY"
36
# check that it's now empty again
37
marker "LIST KEYRING 3"
38
list_keyring $keyringid
39
expect_keyring_rlist rlist empty
41
# stick another key in the keyring
43
create_key user lizard2 gizzard $keyringid
46
# check that we can list it
47
marker "LIST KEYRING 4"
48
list_keyring $keyringid
49
expect_keyring_rlist rlist $keyid
51
# invalidate the keyring
52
marker "INVALIDATE KEYRING"
53
invalidate_key $keyringid
55
# need to wait for the gc
58
# check that the keyring no longer exists
59
marker "CHECK KEYRING"
60
list_keyring --fail $keyringid
63
# check that the key got gc'd also
65
describe_key --fail $keyid
68
echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
70
# --- then report the results in the database ---
71
toolbox_report_result $TEST $result