Skip to content

Commit

Permalink
[integration tests] add simple API admin test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbygdell committed Aug 13, 2024
1 parent 4372d29 commit 02bc0ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/integration/sda/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
log:
format: "json"
level: "debug"
admin:
users: "[email protected]"
archive:
type: s3
url: "http://s3"
Expand Down
10 changes: 10 additions & 0 deletions .github/integration/tests/sda/60_api_admin_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
set -e

token="$(curl http://oidc:8080/tokens | jq -r '.[0]')"
result="$(curl -sk -L "http://api:8080/users/[email protected]/files" -H "Authorization: Bearer $token" | jq '. | length')"
if [ "$result" -ne 4 ]; then
echo "wong number of files returned for user [email protected]"
echo "expected 4 got $result"
exit 1
fi

0 comments on commit 02bc0ad

Please sign in to comment.