blob: 2ec2763acc2f3c89b138b2ccff5789ab7af238ac [file] [log] [blame]
#!/usr/bin/env bash
# example cord webserver post request to update config for cluster test
cat > /tmp/testconfig.json <<EOF
{
"test_case" : "cluster",
"config" :
{
"TLS_TIMEOUT" : 10,
"ITERATIONS" : 50
}
}
EOF
curl -H "Content-Type: application/json" -X POST -d @/tmp/testconfig.json http://localhost:5000/update
rm -f /tmp/testconfig.json
read -p "Do you want to restore the config?" ans
case "$ans" in
[Yy]*)
echo "Restoring test case config"
curl -H "Content-Type: application/json" -X POST -d '{ "test_case" : "cluster" }' http://localhost:5000/restore
;;
esac