Skip to content

Commit 22ab80c

Browse files
authoredDec 6, 2024··
feat: add dedicated gherkin file for events (and grace attempts) (#164)
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
1 parent 4bc696e commit 22ab80c

File tree

2 files changed

+46
-22
lines changed

2 files changed

+46
-22
lines changed
 

‎gherkin/config.feature

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Feature: Configuration Test
2-
"""markdown
2+
"""markdown
33
This is the official option configuration table
44
| Option name | Environment variable name | Explanation | Type & Values | Default | Compatible resolver |
55
| --------------------- | ------------------------------ | ------------------------------------------------------------------------------- | ---------------------------- | ----------------------------- | ------------------- |
@@ -96,12 +96,12 @@ Feature: Configuration Test
9696
When a config was initialized
9797
Then the option "<option>" of type "<type>" should have the value "<value>"
9898
Examples:
99-
| option | type | value |
100-
| resolver | ResolverType | in-process |
101-
| host | String | local |
102-
| tls | Boolean | True |
103-
| port | Integer | 1234 |
104-
| deadline | Integer | 123 |
99+
| option | type | value |
100+
| resolver | ResolverType | in-process |
101+
| host | String | local |
102+
| tls | Boolean | True |
103+
| port | Integer | 1234 |
104+
| deadlineMs | Integer | 123 |
105105
@targetURI
106106
Examples: Target URI
107107
| option | type | value |
@@ -147,15 +147,15 @@ Feature: Configuration Test
147147
When a config was initialized
148148
Then the option "<option>" of type "<type>" should have the value "<value>"
149149
Examples:
150-
| option | env | type | value |
151-
| resolver | FLAGD_RESOLVER | ResolverType | in-process |
152-
| resolver | FLAGD_RESOLVER | ResolverType | IN-PROCESS |
153-
| resolver | FLAGD_RESOLVER | ResolverType | rpc |
154-
| resolver | FLAGD_RESOLVER | ResolverType | RPC |
155-
| host | FLAGD_HOST | String | local |
156-
| tls | FLAGD_TLS | Boolean | True |
157-
| port | FLAGD_PORT | Integer | 1234 |
158-
| deadline | FLAGD_DEADLINE_MS | Integer | 123 |
150+
| option | env | type | value |
151+
| resolver | FLAGD_RESOLVER | ResolverType | in-process |
152+
| resolver | FLAGD_RESOLVER | ResolverType | IN-PROCESS |
153+
| resolver | FLAGD_RESOLVER | ResolverType | rpc |
154+
| resolver | FLAGD_RESOLVER | ResolverType | RPC |
155+
| host | FLAGD_HOST | String | local |
156+
| tls | FLAGD_TLS | Boolean | True |
157+
| port | FLAGD_PORT | Integer | 1234 |
158+
| deadlineMs | FLAGD_DEADLINE_MS | Integer | 123 |
159159
@targetURI
160160
Examples: Target URI
161161
| option | env | type | value |
@@ -202,12 +202,12 @@ Feature: Configuration Test
202202
When a config was initialized
203203
Then the option "<option>" of type "<type>" should have the value "<value>"
204204
Examples:
205-
| option | env | type | value | env-value |
206-
| resolver | FLAGD_RESOLVER | ResolverType | in-process | rpc |
207-
| host | FLAGD_HOST | String | local | l |
208-
| tls | FLAGD_TLS | Boolean | True | False |
209-
| port | FLAGD_PORT | Integer | 1234 | 3456 |
210-
| deadline | FLAGD_DEADLINE_MS | Integer | 123 | 345 |
205+
| option | env | type | value | env-value |
206+
| resolver | FLAGD_RESOLVER | ResolverType | in-process | rpc |
207+
| host | FLAGD_HOST | String | local | l |
208+
| tls | FLAGD_TLS | Boolean | True | False |
209+
| port | FLAGD_PORT | Integer | 1234 | 3456 |
210+
| deadlineMs | FLAGD_DEADLINE_MS | Integer | 123 | 345 |
211211
@targetURI
212212
Examples: Target URI
213213
| option | env | type | value | env-value |

‎gherkin/events.feature

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@grace
2+
Feature: Flagd Provider State Changes
3+
4+
Background:
5+
Given a flagd provider is set
6+
7+
Scenario Outline: Provider events
8+
When a <event> handler is added
9+
Then the <event> handler must run
10+
Examples:
11+
| event |
12+
| PROVIDER_ERROR |
13+
| PROVIDER_STALE |
14+
| PROVIDER_READY |
15+
16+
Scenario: Provider events chain ready -> stale -> error -> ready
17+
When a PROVIDER_READY handler is added
18+
Then the PROVIDER_READY handler must run
19+
When a PROVIDER_STALE handler is added
20+
Then the PROVIDER_STALE handler must run
21+
When a PROVIDER_ERROR handler is added
22+
Then the PROVIDER_ERROR handler must run
23+
When a PROVIDER_READY handler is added
24+
Then the PROVIDER_READY handler must run

0 commit comments

Comments
 (0)
Please sign in to comment.