-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_cli.sh
31 lines (24 loc) · 883 Bytes
/
test_cli.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -a
set -e
set -x
default_pythonpath=$PYTHONPATH:.
export PYTHONPATH=${default_pythonpath:-.}
d=`mktemp -d`
g=`mktemp -d`
# works with gnupg 2.2.41
export GNUPGHOME=$g
gpg --homedir $g --passphrase '' --quick-generate-key --pinentry loopback --yes testuser
fp=`gpg --list-keys --homedir $g testuser 2> /dev/null | awk '/^ / {print $1;}'`
i_foo=`python piknik/runnable/cmd.py -d $d add "foo"`
i_bar=`python piknik/runnable/cmd.py -d $d add "bar"`
python piknik/runnable/cmd.py mod -d $d --accept -i $i_foo
python piknik/runnable/cmd.py mod -d $d --finish -i $i_bar
python piknik/runnable/cmd.py comment -d $d -s $fp -x bazbazbaz -i $i_foo
python piknik/runnable/cmd.py show -d $d
python piknik/runnable/cmd.py show -d $d -r html
python piknik/runnable/cmd.py show -d $d -i $i_foo
python piknik/runnable/cmd.py show -d $d -r html -i $i_bar
set +x
set +e
set +a