3 # Tests for the BULK protocol command.
8 .
$AM_SRCDIR/import-common.sh
12 cat >$OUTDIR/config
<<EOF
18 passphrase_file=$WDIR/passphrase.key
20 passphrase_file=$WDIR/passphrase.key
26 cp -f data
/datafile data
/datafile.tmp || bail_out
"Could not copy data/datafile"
27 run_pwmc
"--inquire 'BULK --inquire' datafile.tmp" $DEVNULL <<EOF
28 (2:id 1:1 7:getinfo7:vrsion)
30 test_failure
$test_n $?
536870941 "Inquire syntax error"
34 cp -f data
/datafile data
/datafile.tmp || bail_out
"Could not copy data/datafile"
35 run_pwmc
"--inquire 'BULK --inquire' datafile.tmp" >result
$DEVNULL <<EOF
36 (2:id 1:1 7:getinfo7:clients
38 (2:id1:2 4:list5:--all
42 (2:id1:4 7:getinfo7:clients)
43 2:id1:5 7:getinfo5:cache))
44 2:id1:6 9:getconfig12:client-state
48 test_result
$test_n $? bulk
"Command branching"
52 cp -f data
/datafile data
/datafile.tmp || bail_out
"Could not copy data/datafile"
53 run_pwmc
"--inquire 'BULK --inquire' datafile.tmp" >result
$DEVNULL <<EOF
54 (2:id 1:1 7:getinfo7:clients
56 (2:id1:2 4:list5:--all
62 (2:id1:5 7:getinfo14:--data clients))
63 2:id1:6 9:getconfig3:nop
66 2:id1:8 7:getinfo 3:nop)
68 test_result
$test_n $? bulk
"Command branching (next rc)"
72 cp -f data
/datafile data
/datafile.tmp || bail_out
"Could not copy data/datafile"
73 run_pwmc
"--inquire 'BULK --inquire' datafile.tmp" >result
$DEVNULL <<EOF
74 (2:id 1:1 7:getinfo7:clients
76 (2:id1:2 4:list5:--all
82 (2:id1:5 7:getinfo14:--data clients))
83 2:id1:6 9:getconfig3:nop
87 (2:id1:8 7:getinfo 3:nop))
89 test_result
$test_n $? bulk
"Command branching (multiple rc's)"