-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathlogs-test-cases.yaml
183 lines (157 loc) · 6.81 KB
/
logs-test-cases.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
config:
inherit-env: true
retries: 1
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 a specific number of logs:
command: auth0 logs list --number 3 --json | jq length
exit-code: 0
stdout:
exactly: "3"
003 - it successfully lists as many logs as possible:
command: auth0 logs list --number 1000
exit-code: 0
004 - it errors because of invalid number arg:
command: auth0 logs list --number 0 --json
exit-code: 1
stderr:
contains:
- "Number flag invalid, please pass a number between 1 and 1000"
005 - it errors because of invalid number arg:
command: auth0 logs list --number 1001 --json
exit-code: 1
stderr:
contains:
- "Number flag invalid, please pass a number between 1 and 1000"
006 - it successfully lists all log streams with no data:
command: auth0 logs streams list
exit-code: 0
stderr:
contains:
- Use 'auth0 logs streams create' to add one
007 - it successfully lists all log streams with no data (json):
command: auth0 logs streams list --json
exit-code: 0
stdout:
exactly: "[]"
008 - it successfully creates a datadog log stream:
command: ./test/integration/scripts/create-log-stream-datadog-id.sh
exit-code: 0
009 - it successfully lists all log streams with data:
command: auth0 logs streams list
exit-code: 0
stdout:
contains:
- ID
- NAME
- TYPE
- STATUS
010 - 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
011 - 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"
012 - 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"
013 - 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"
014 - 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
015 - it successfully creates an eventbridge log stream:
command: ./test/integration/scripts/create-log-stream-eventbridge-id.sh
exit-code: 0
016 - 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"
017 - 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
018 - it successfully creates an http log stream:
command: ./test/integration/scripts/create-log-stream-http-id.sh
exit-code: 0
019 - 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" --type "application/xml" --authorization "KHEWXXXXXXXXXXXXXXXX" --json --no-input
exit-code: 0
stdout:
json:
name: "integration-test-updated-http"
type: "http"
status: "active"
sink.httpContentFormat: "JSONOBJECT"
sink.httpContentType: "application/xml"
sink.httpEndpoint: "https://example.com/webhook/logs/v2"
sink.httpAuthorization: "KHEWXXXXXXXXXXXXXXXX"
020 - 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
021 - it successfully creates a splunk log stream:
command: ./test/integration/scripts/create-log-stream-splunk-id.sh
exit-code: 0
022 - 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"
023 - 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
024 - it successfully creates a sumo log stream:
command: ./test/integration/scripts/create-log-stream-sumo-id.sh
exit-code: 0
025 - 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"
026 - 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