-
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: Expand logs test cases (#663)
- Loading branch information
Showing
14 changed files
with
209 additions
and
18 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
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
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
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,139 @@ | ||
config: | ||
inherit-env: true | ||
|
||
tests: | ||
001 - it successfully lists all logs: | ||
command: auth0 logs list | ||
exit-code: 0 | ||
stdout: | ||
contains: | ||
- TYPE | ||
- DESCRIPTION | ||
- DATE | ||
- CONNECTION | ||
- CLIENT | ||
|
||
002 - it successfully lists all log streams: | ||
command: auth0 logs streams list | ||
exit-code: 0 | ||
|
||
003 - it successfully creates a datadog log stream: | ||
command: ./test/integration/scripts/create-log-stream-datadog-id.sh | ||
exit-code: 0 | ||
|
||
004 - given a datadog log stream, it successfully gets the log stream's details: | ||
command: auth0 logs streams show $(cat ./test/integration/identifiers/log-stream-datadog-id) | ||
exit-code: 0 | ||
stdout: | ||
contains: | ||
- NAME integration-test-datadog | ||
- TYPE datadog | ||
- STATUS active | ||
|
||
005 - given a datadog log stream, it successfully gets the log stream's details and outputs in json: | ||
command: auth0 logs streams show $(cat ./test/integration/identifiers/log-stream-datadog-id) --json | ||
exit-code: 0 | ||
stdout: | ||
json: | ||
name: "integration-test-datadog" | ||
type: "datadog" | ||
status: "active" | ||
sink.datadogRegion: "eu" | ||
|
||
006 - given a datadog log stream, it successfully updates the log stream's details: | ||
command: auth0 logs streams update datadog $(cat ./test/integration/identifiers/log-stream-datadog-id) --name integration-test-updated-datadog --region us --api-key 123123123123123 --json | ||
exit-code: 0 | ||
stdout: | ||
json: | ||
name: "integration-test-updated-datadog" | ||
type: "datadog" | ||
status: "active" | ||
sink.datadogRegion: "us" | ||
|
||
007 - given a datadog log stream, it successfully opens the log stream's settings page: | ||
command: auth0 logs streams open $(cat ./test/integration/identifiers/log-stream-datadog-id) --no-input | ||
exit-code: 0 | ||
stderr: | ||
contains: | ||
- "Open the following URL in a browser" | ||
|
||
008 - given a datadog log stream, it successfully deletes the log stream: | ||
command: auth0 logs streams delete $(cat ./test/integration/identifiers/log-stream-datadog-id) --force --no-input | ||
exit-code: 0 | ||
|
||
009 - it successfully creates an eventbridge log stream: | ||
command: ./test/integration/scripts/create-log-stream-eventbridge-id.sh | ||
exit-code: 0 | ||
|
||
010 - given an eventbridge log stream, it successfully updates the log stream's details: | ||
command: auth0 logs streams update eventbridge $(cat ./test/integration/identifiers/log-stream-eventbridge-id) --name integration-test-updated-eventbridge --json | ||
exit-code: 0 | ||
stdout: | ||
json: | ||
name: "integration-test-updated-eventbridge" | ||
type: "eventbridge" | ||
status: "active" | ||
|
||
011 - given an eventbridge log stream, it successfully deletes the log stream: | ||
command: auth0 logs streams delete $(cat ./test/integration/identifiers/log-stream-eventbridge-id) --force --no-input | ||
exit-code: 0 | ||
|
||
012 - it successfully creates an http log stream: | ||
command: ./test/integration/scripts/create-log-stream-http-id.sh | ||
exit-code: 0 | ||
|
||
013 - given an http log stream, it successfully updates the log stream's details: | ||
command: auth0 logs streams update http $(cat ./test/integration/identifiers/log-stream-http-id) --name integration-test-updated-http --endpoint "https://example.com/webhook/logs/v2" --format "JSONOBJECT" --json --no-input | ||
exit-code: 0 | ||
stdout: | ||
json: | ||
name: "integration-test-updated-http" | ||
type: "http" | ||
status: "active" | ||
sink.httpContentFormat: "JSONOBJECT" | ||
sink.httpContentType: "application/json" | ||
sink.httpEndpoint: "https://example.com/webhook/logs/v2" | ||
|
||
|
||
014 - given an http log stream, it successfully deletes the log stream: | ||
command: auth0 logs streams delete $(cat ./test/integration/identifiers/log-stream-http-id) --force --no-input | ||
exit-code: 0 | ||
|
||
015 - it successfully creates a splunk log stream: | ||
command: ./test/integration/scripts/create-log-stream-splunk-id.sh | ||
exit-code: 0 | ||
|
||
016 - given a splunk log stream, it successfully updates the log stream's details: | ||
command: auth0 logs streams update splunk $(cat ./test/integration/identifiers/log-stream-splunk-id) --name integration-test-updated-splunk --domain "example.splunk.com" --token "92a34ab5-c6d7-8901-23ef-456b7c89d0c1" --port 8000 --secure --json --no-input | ||
exit-code: 0 | ||
stdout: | ||
json: | ||
name: "integration-test-updated-splunk" | ||
type: "splunk" | ||
status: "active" | ||
sink.splunkDomain: "example.splunk.com" | ||
sink.splunkToken: "92a34ab5-c6d7-8901-23ef-456b7c89d0c1" | ||
sink.splunkPort: "8000" | ||
sink.splunkSecure: "true" | ||
|
||
017 - given a splunk log stream, it successfully deletes the log stream: | ||
command: auth0 logs streams delete $(cat ./test/integration/identifiers/log-stream-splunk-id) --force --no-input | ||
exit-code: 0 | ||
|
||
018 - it successfully creates a sumo log stream: | ||
command: ./test/integration/scripts/create-log-stream-sumo-id.sh | ||
exit-code: 0 | ||
|
||
019 - given a sumo log stream, it successfully updates the log stream's details: | ||
command: auth0 logs streams update sumo $(cat ./test/integration/identifiers/log-stream-sumo-id) --name integration-test-updated-sumo --source "example.sumo.com" --json --no-input | ||
exit-code: 0 | ||
stdout: | ||
json: | ||
name: "integration-test-updated-sumo" | ||
type: "sumo" | ||
status: "active" | ||
sink.sumoSourceAddress: "example.sumo.com" | ||
|
||
020 - given a sumo log stream, it successfully deletes the log stream: | ||
command: auth0 logs streams delete $(cat ./test/integration/identifiers/log-stream-sumo-id) --force --no-input | ||
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 | ||
|
||
logStream=$( auth0 logs streams create datadog --name integration-test-datadog --region eu --api-key 123233123455 --json --no-input ) | ||
|
||
mkdir -p ./test/integration/identifiers | ||
echo "$logStream" | jq -r '.["id"]' > ./test/integration/identifiers/log-stream-datadog-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /bin/bash | ||
|
||
logStream=$( auth0 logs streams create eventbridge --name integration-test-eventbridge --aws-id 999999999999 --aws-region eu-west-1 --json --no-input ) | ||
|
||
mkdir -p ./test/integration/identifiers | ||
echo "$logStream" | jq -r '.["id"]' > ./test/integration/identifiers/log-stream-eventbridge-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /bin/bash | ||
|
||
logStream=$( auth0 logs streams create http --name integration-test-http --endpoint "https://example.com/webhook/logs" --type "application/json" --format "JSONLINES" --json --no-input ) | ||
|
||
mkdir -p ./test/integration/identifiers | ||
echo "$logStream" | jq -r '.["id"]' > ./test/integration/identifiers/log-stream-http-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /bin/bash | ||
|
||
logStream=$( auth0 logs streams create splunk --name integration-test-splunk --domain "demo.splunk.com" --token "12a34ab5-c6d7-8901-23ef-456b7c89d0c1" --port "8088" --secure --json --no-input ) | ||
|
||
mkdir -p ./test/integration/identifiers | ||
echo "$logStream" | jq -r '.["id"]' > ./test/integration/identifiers/log-stream-splunk-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /bin/bash | ||
|
||
logStream=$( auth0 logs streams create sumo --name integration-test-sumo --source "demo.sumo.com" --json --no-input ) | ||
|
||
mkdir -p ./test/integration/identifiers | ||
echo "$logStream" | jq -r '.["id"]' > ./test/integration/identifiers/log-stream-sumo-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