blob: 2ec2763acc2f3c89b138b2ccff5789ab7af238ac [file] [log] [blame]
A R Karthicka974c212017-07-17 19:47:12 -07001#!/usr/bin/env bash
2
3# example cord webserver post request to update config for cluster test
4
5cat > /tmp/testconfig.json <<EOF
6{
7"test_case" : "cluster",
8 "config" :
9 {
10 "TLS_TIMEOUT" : 10,
11 "ITERATIONS" : 50
12 }
13}
14EOF
15curl -H "Content-Type: application/json" -X POST -d @/tmp/testconfig.json http://localhost:5000/update
16rm -f /tmp/testconfig.json
17read -p "Do you want to restore the config?" ans
18case "$ans" in
19 [Yy]*)
20 echo "Restoring test case config"
21 curl -H "Content-Type: application/json" -X POST -d '{ "test_case" : "cluster" }' http://localhost:5000/restore
22 ;;
23esac