Fix PASSWD to allow changing to an empty passphrase for PKI files.
[pwmd.git] / tests / list.test
blobd4de9a24c49063176af3b70fbd10128d6d1a6c5d
1 #!/bin/bash
2 source common.sh
3 source import-common.sh
5 do_import list
7 cat > config << EOF
8 [global]
9 log_level=9
10 #enable_logging=true
11 [list]
12 passphrase_file=`pwd`/list.key
13 EOF
15 launch_pwmd list
17 begin_test
18 echo "Test 1. List root elements."
19 echo -ne 'LIST' | pwmc $PWMC_ARGS list > result
20 cmp list.result1 result
21 rm -f result
23 echo
24 echo "Test 2. List root elements, verbose."
25 echo -ne 'LIST --verbose' | pwmc $PWMC_ARGS list > result
26 cmp list.result2 result
27 rm -f result
29 echo
30 echo "Test 3. List root elements, verbose with targets."
31 echo -ne 'LIST --verbose --with-target' | pwmc $PWMC_ARGS list > result
32 cmp list.result3 result
33 rm -f result
35 echo
36 echo "Test 4. List all elements, verbose with targets."
37 echo -ne 'LIST --all --with-target' | pwmc $PWMC_ARGS list > result
38 cmp list.result4 result
39 rm -f result
41 echo
42 echo "Test 5. List single path, verbose with targets."
43 echo -ne 'LIST --all --with-target !a\t!b' | pwmc $PWMC_ARGS list \
44 > result
45 cmp list.result5 result
46 rm -f result
48 test_success