-
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-415: Quickstarts integration tests (#693)
* Seperating qs tests out, adding cleanup and download test * Separating qs app script * Adding quick unit test --------- Co-authored-by: Will Vedder <[email protected]>
- Loading branch information
Showing
6 changed files
with
44 additions
and
8 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
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,15 @@ | ||
package cli | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestQuickstartsTypeFor(t *testing.T) { | ||
assert.Equal(t, qsSpa, quickstartsTypeFor("spa")) | ||
assert.Equal(t, qsWebApp, quickstartsTypeFor("regular_web")) | ||
assert.Equal(t, qsWebApp, quickstartsTypeFor("regular_web")) | ||
assert.Equal(t, qsBackend, quickstartsTypeFor("non_interactive")) | ||
assert.Equal(t, "generic", quickstartsTypeFor("some-unknown-value")) | ||
} |
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,13 @@ | ||
config: | ||
inherit-env: true | ||
tests: | ||
001 - list quickstarts: | ||
command: auth0 quickstarts list | ||
exit-code: 0 | ||
002 - download quickstart: | ||
command: auth0 qs download $(./test/integration/scripts/get-quickstart-app-id.sh) --stack "React Native" --no-color --force | ||
exit-code: 0 | ||
stderr: | ||
contains: | ||
- "Quickstart sample successfully downloaded at " | ||
- "Hint: Start with `cd integration-test-app-qs/00-" |
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,13 @@ | ||
#! /bin/bash | ||
|
||
FILE=./test/integration/identifiers/qs-app-id | ||
if [ -f "$FILE" ]; then | ||
cat $FILE | ||
exit 0 | ||
fi | ||
|
||
app=$( auth0 apps create -n integration-test-app-qs -t native --description "Quickstart app" --json --no-input ) | ||
|
||
mkdir -p ./test/integration/identifiers | ||
echo "$app" | jq -r '.["client_id"]' > $FILE | ||
cat $FILE |
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