Skip to content

Commit 94b8efd

Browse files
committed
test(apps): add tests for third-party app creation and management
- Added integration tests for creating, showing, updating, and deleting a third-party app. - Created a new script `get-3p-app-id.sh` to handle the app ID retrieval for testing. - Updated existing test cases to reflect the new structure and ensure proper validation of third-party app properties.
1 parent 56aa4c8 commit 94b8efd

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

test/integration/apps-test-cases.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,28 @@ tests:
377377
command: auth0 apps delete $(./test/integration/scripts/get-resource-server-app-id.sh) --force
378378
exit-code: 0
379379

380-
051 - it successfully creates a regular app with third-party-security-mode and redirection-policy and outputs in json:
381-
command: auth0 apps create --name integration-test-app-3p-strict --type regular --description 3PApp1 --third-party-security-mode strict --redirection-policy open_redirect_protection --json
380+
051 - it successfully creates a third-party app with strict security mode:
381+
command: ./test/integration/scripts/get-3p-app-id.sh
382+
exit-code: 0
383+
384+
052 - it successfully shows a third-party app with security mode and redirection policy in json:
385+
command: auth0 apps show $(./test/integration/scripts/get-3p-app-id.sh) --json
382386
exit-code: 0
383387
stdout:
384388
json:
385389
name: integration-test-app-3p-strict
386390
app_type: regular_web
391+
is_first_party: "false"
387392
third_party_security_mode: strict
388393
redirection_policy: open_redirect_protection
394+
395+
053 - it successfully updates the redirection-policy of a third-party app and outputs in json:
396+
command: auth0 apps update $(./test/integration/scripts/get-3p-app-id.sh) --redirection-policy allow_always --json
397+
exit-code: 0
398+
stdout:
399+
json:
400+
redirection_policy: allow_always
401+
402+
054 - given a third-party app, it successfully deletes the app:
403+
command: auth0 apps delete $(./test/integration/scripts/get-3p-app-id.sh) --force
404+
exit-code: 0
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#! /bin/bash
2+
3+
FILE=./test/integration/identifiers/3p-app-id
4+
if [ -f "$FILE" ]; then
5+
cat $FILE
6+
exit 0
7+
fi
8+
9+
app=$( auth0 apps create -n integration-test-app-3p-strict -t regular --description 3PApp1 --is-first-party=false --third-party-security-mode strict --redirection-policy open_redirect_protection --json --no-input )
10+
11+
mkdir -p ./test/integration/identifiers
12+
echo "$app" | jq -r '.["client_id"]' > $FILE
13+
cat $FILE

0 commit comments

Comments
 (0)