summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/config/ogAdmServer.cfg1
-rwxr-xr-xtests/run-tests.sh22
2 files changed, 13 insertions, 10 deletions
diff --git a/tests/config/ogAdmServer.cfg b/tests/config/ogAdmServer.cfg
index aa20113..41d812b 100644
--- a/tests/config/ogAdmServer.cfg
+++ b/tests/config/ogAdmServer.cfg
@@ -5,3 +5,4 @@ PASSWORD=test-db
datasource=localhost
CATALOG=test-db
INTERFACE=eth1
+APITOKEN=07b3bfe728954619b58f0107ad73acc1
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index f0cae2a..ca00b5f 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -1,10 +1,12 @@
-curl -X POST http://127.0.0.1:8888/clients -d @post_clients.json
-curl -X GET http://127.0.0.1:8888/clients
-curl -X POST http://127.0.0.1:8888/wol -d @wol.json
-curl -X POST http://127.0.0.1:8888/shell/run -d @post_shell_run.json
-curl -X POST http://127.0.0.1:8888/shell/output -d @post_shell_output.json
-curl -X POST http://127.0.0.1:8888/session -d @session.json
-curl -X POST http://127.0.0.1:8888/poweroff -d @poweroff.json
-curl -X POST http://127.0.0.1:8888/reboot -d @reboot.json
-curl -X POST http://127.0.0.1:8888/stop -d @stop.json
-curl -X POST http://127.0.0.1:8888/refresh -d @refresh.json
+API_KEY="07b3bfe728954619b58f0107ad73acc1"
+
+curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/clients -d @post_clients.json
+curl -X GET -H "Authorization: $API_KEY" http://127.0.0.1:8888/clients
+curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/wol -d @wol.json
+curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/shell/run -d @post_shell_run.json
+curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/shell/output -d @post_shell_output.json
+curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/session -d @session.json
+curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/poweroff -d @poweroff.json
+curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/reboot -d @reboot.json
+curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/stop -d @stop.json
+curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/refresh -d @refresh.json