Skip to content

Commit

Permalink
feat: fix regression in config gherkin and add feature gherkin
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Schrottner <[email protected]>
  • Loading branch information
aepfli committed Dec 6, 2024
1 parent e3aa2f8 commit 780e428
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 22 deletions.
44 changes: 22 additions & 22 deletions gherkin/config.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Feature: Configuration Test
"""markdown
"""markdown
This is the official option configuration table
| Option name | Environment variable name | Explanation | Type & Values | Default | Compatible resolver |
| --------------------- | ------------------------------ | ------------------------------------------------------------------------------- | ---------------------------- | ----------------------------- | ------------------- |
Expand Down Expand Up @@ -96,12 +96,12 @@ Feature: Configuration Test
When a config was initialized
Then the option "<option>" of type "<type>" should have the value "<value>"
Examples:
| option | type | value |
| resolver | ResolverType | in-process |
| host | String | local |
| tls | Boolean | True |
| port | Integer | 1234 |
| deadline | Integer | 123 |
| option | type | value |
| resolver | ResolverType | in-process |
| host | String | local |
| tls | Boolean | True |
| port | Integer | 1234 |
| deadlineMs | Integer | 123 |
@targetURI
Examples: Target URI
| option | type | value |
Expand Down Expand Up @@ -147,15 +147,15 @@ Feature: Configuration Test
When a config was initialized
Then the option "<option>" of type "<type>" should have the value "<value>"
Examples:
| option | env | type | value |
| resolver | FLAGD_RESOLVER | ResolverType | in-process |
| resolver | FLAGD_RESOLVER | ResolverType | IN-PROCESS |
| resolver | FLAGD_RESOLVER | ResolverType | rpc |
| resolver | FLAGD_RESOLVER | ResolverType | RPC |
| host | FLAGD_HOST | String | local |
| tls | FLAGD_TLS | Boolean | True |
| port | FLAGD_PORT | Integer | 1234 |
| deadline | FLAGD_DEADLINE_MS | Integer | 123 |
| option | env | type | value |
| resolver | FLAGD_RESOLVER | ResolverType | in-process |
| resolver | FLAGD_RESOLVER | ResolverType | IN-PROCESS |
| resolver | FLAGD_RESOLVER | ResolverType | rpc |
| resolver | FLAGD_RESOLVER | ResolverType | RPC |
| host | FLAGD_HOST | String | local |
| tls | FLAGD_TLS | Boolean | True |
| port | FLAGD_PORT | Integer | 1234 |
| deadlineMs | FLAGD_DEADLINE_MS | Integer | 123 |
@targetURI
Examples: Target URI
| option | env | type | value |
Expand Down Expand Up @@ -202,12 +202,12 @@ Feature: Configuration Test
When a config was initialized
Then the option "<option>" of type "<type>" should have the value "<value>"
Examples:
| option | env | type | value | env-value |
| resolver | FLAGD_RESOLVER | ResolverType | in-process | rpc |
| host | FLAGD_HOST | String | local | l |
| tls | FLAGD_TLS | Boolean | True | False |
| port | FLAGD_PORT | Integer | 1234 | 3456 |
| deadline | FLAGD_DEADLINE_MS | Integer | 123 | 345 |
| option | env | type | value | env-value |
| resolver | FLAGD_RESOLVER | ResolverType | in-process | rpc |
| host | FLAGD_HOST | String | local | l |
| tls | FLAGD_TLS | Boolean | True | False |
| port | FLAGD_PORT | Integer | 1234 | 3456 |
| deadlineMs | FLAGD_DEADLINE_MS | Integer | 123 | 345 |
@targetURI
Examples: Target URI
| option | env | type | value | env-value |
Expand Down
29 changes: 29 additions & 0 deletions gherkin/events.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Feature: flagd providers

# This test suite contains scenarios to test flagd providers.
# It's associated with the flags configured in flags/changing-flag.json and flags/zero-flags.json.
# It should be used in conjunction with the suites supplied by the OpenFeature specification.

Background:
Given a flagd provider is set

# events
Scenario Outline: Provider events
When a <event> handler is added
Then the <event> handler must run
Examples:
| event |
| PROVIDER_ERROR |
| PROVIDER_STALE |
| PROVIDER_READY |

# events
Scenario: Provider events chain ready -> stale -> error -> ready
When a PROVIDER_READY handler is added
Then the PROVIDER_READY handler must run
When a PROVIDER_STALE handler is added
Then the PROVIDER_STALE handler must run
When a PROVIDER_ERROR handler is added
Then the PROVIDER_ERROR handler must run
When a PROVIDER_READY handler is added
Then the PROVIDER_READY handler must run

0 comments on commit 780e428

Please sign in to comment.