-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DXCDT-386: Make api test cases more robust (#665)
- Loading branch information
Showing
2 changed files
with
31 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
config: | ||
inherit-env: true | ||
|
||
tests: | ||
001 - it successfully uses the api command to fetch tenant settings: | ||
command: auth0 api get "tenants/settings" --query "include_fields=true" --query "fields=idle_session_lifetime" | ||
exit-code: 0 | ||
stdout: | ||
contains: | ||
- "idle_session_lifetime" | ||
|
||
002 - it successfully uses the api command to patch tenant settings with piped data: | ||
command: cat ./test/integration/fixtures/update-tenant-settings.json | auth0 api patch "tenants/settings" && auth0 api get "tenants/settings" --query "include_fields=true" --query "fields=idle_session_lifetime" | ||
exit-code: 0 | ||
stdout: | ||
json: | ||
idle_session_lifetime: "73" | ||
|
||
003 - it successfully uses the api command to patch tenant settings: | ||
command: auth0 api patch "tenants/settings" --data "{\"idle_session_lifetime\":72}" && auth0 api get "tenants/settings" --query "include_fields=true" --query "fields=idle_session_lifetime" | ||
exit-code: 0 | ||
stdout: | ||
json: | ||
idle_session_lifetime: "72" | ||
|
||
004 - it fails to use the api command to patch tenant settings with invalid json: | ||
command: auth0 api patch "tenants/settings" --data "{\"idle_session_lifetime:72}" | ||
exit-code: 1 | ||
stderr: | ||
contains: | ||
- "failed to parse command inputs: invalid json data given" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters