diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-08-21 17:34:00 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-11-07 19:49:55 +0100 |
commit | 3b5f2a40a4d57934825896ba31a1d929ebf02603 (patch) | |
tree | d075f730ee69d82f3fa2a0f9c914ff2753330554 /tests |
Initial commit
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test.sh b/tests/test.sh new file mode 100755 index 0000000..50739f5 --- /dev/null +++ b/tests/test.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e +HOST=${HOST:-localhost} + +# Check features +curl -s -H "Content-Type: application/json" http://$HOST:8080/features \ + | grep -qs '["realm"]' + +# Create a host +curl -H "Content-Type: application/json" -dhostname=foo -duserclass=bar -X POST "http://$HOST:8080/realm/example.com" +echo +curl -H "Content-Type: application/json" -X DELETE "http://$HOST:8080/realm/example.com/foo" +# Removing nonexistent host is o.k. +curl -H "Content-Type: application/json" -X DELETE "http://$HOST:8080/realm/example.com/foo" |