-
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.
[CLI-164] users integration test (#300)
* [CLI-164] users integration test * [CLI-164] updated scopes * [CLI-164] updated scopes Co-authored-by: Rita Zerrizuela <[email protected]>
- Loading branch information
1 parent
c5ff007
commit f0f9ca4
Showing
4 changed files
with
81 additions
and
3 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 |
---|---|---|
|
@@ -374,3 +374,56 @@ tests: | |
json: | ||
allow_offline_access: "false" | ||
exit-code: 0 | ||
|
||
# Test 'users create' | ||
users create and check data: | ||
command: auth0 users create --name integration-test-user-new --connection Username-Password-Authentication --email [email protected] --password testUser12 --format json --no-input | ||
exit-code: 0 | ||
stdout: | ||
json: | ||
Email: "[email protected]" | ||
Connection: "Username-Password-Authentication" | ||
|
||
users create and check output: | ||
command: auth0 users create --name integration-test-user-new2 --connection Username-Password-Authentication --email [email protected] --password testUser12 --no-input | ||
exit-code: 0 | ||
stdout: | ||
contains: | ||
- EMAIL [email protected] | ||
- CONNECTION Username-Password-Authentication | ||
|
||
# Test 'users show' | ||
users create test user: | ||
command: ./integration/get-user-id.sh | ||
exit-code: 0 | ||
|
||
users show json: | ||
command: auth0 users show $(cat ./integration/identifiers/user-id) --format json | ||
stdout: | ||
json: | ||
Email: "[email protected]" | ||
Connection: "Username-Password-Authentication" | ||
exit-code: 0 | ||
|
||
users show: | ||
command: auth0 users show $(cat ./integration/identifiers/user-id) | ||
stdout: | ||
contains: | ||
- EMAIL [email protected] | ||
- CONNECTION Username-Password-Authentication | ||
exit-code: 0 | ||
|
||
# Test 'users update' | ||
users update email: | ||
command: auth0 users update $(cat ./integration/identifiers/user-id) --email [email protected] --format json --no-input | ||
stdout: | ||
json: | ||
Email: [email protected] | ||
exit-code: 0 | ||
|
||
users update name: | ||
command: auth0 users update $(cat ./integration/identifiers/user-id) --name integration-test-user-bettername --format json --no-input | ||
stdout: | ||
json: | ||
Email: [email protected] # Name is not being displayed, hence using email | ||
exit-code: 0 |
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,6 @@ | ||
#! /bin/bash | ||
|
||
user=$( auth0 users create -n integration-test-user-better -c Username-Password-Authentication -e [email protected] -p testUser12 --format json --no-input ) | ||
|
||
mkdir -p ./integration/identifiers | ||
echo "$user" | jq -r '.["UserID"]' > ./integration/identifiers/user-id |
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
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