aboutsummaryrefslogtreecommitdiff
path: root/scripts/testroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/testroot.sh')
-rw-r--r--scripts/testroot.sh26
1 files changed, 24 insertions, 2 deletions
diff --git a/scripts/testroot.sh b/scripts/testroot.sh
index 52ee1425..ebc61d95 100644
--- a/scripts/testroot.sh
+++ b/scripts/testroot.sh
@@ -29,8 +29,7 @@ mysql -u rpki -p`awk '$1 == "sql-password" {print $3}' rpkid.conf` rpki <../docs
# Start rpkid so we can configure it, make sure we shut it down on exit
-python rpkid.py &
-rpkid=$!
+python rpkid.py & rpkid=$!
trap "kill $rpkid" 0
# Create a self instance
@@ -64,3 +63,26 @@ python irbe-cli.py child --self_id 1 --action create --bsc_id 1 --cms_ta biz-cer
# Need to link irdb to created child. For now, just do this manually in MySQL CLI:
#
# UPDATE registrant SET rpki_self_id = 1, rpki_child_id = 1 WHERE subject_name = "Epilogue Technology Corporation"
+
+if test "$1" = "run"
+then
+
+ python testroot.py & testroot=$!
+ python irdb.py & irdb=$!
+ trap "kill $rpkid $irdb $testroot" 0
+
+ python http-client.py
+ python testpoke.py -r list
+ python testpoke.py -r issue
+
+ python http-client.py
+ python testpoke.py -r list
+ python testpoke.py -r issue
+
+ python testpoke.py -r issue |
+ qh |
+ sed -n '/^(certificate/,/^)certificate/s/^-//p' |
+ mimencode -u |
+ $openssl x509 -noout -inform DER -text
+
+fi