Skip to content

Commit fe9c3c8

Browse files
authoredDec 2, 2024··
feat: add Gherking file for config (#156)
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
1 parent 19eb301 commit fe9c3c8

File tree

1 file changed

+189
-0
lines changed

1 file changed

+189
-0
lines changed
 

‎gherkin/config.feature

+189
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
Feature: Configuration Test
2+
3+
@rpc @in-process
4+
Scenario Outline: Default Config
5+
When we initialize a config
6+
Then the option "<option>" of type "<type>" should have the value "<default>"
7+
Examples: Basic
8+
| option | type | default |
9+
| resolverType | ResolverType | rpc |
10+
| host | String | localhost |
11+
| port | Integer | 8013 |
12+
| tls | Boolean | false |
13+
| deadline | Integer | 500 |
14+
@customCert
15+
Examples: Certificates
16+
| option | type | default |
17+
| certPath | String | null |
18+
@unixsocket
19+
Examples: Unixsocket
20+
| option | type | default |
21+
| socketPath | String | null |
22+
@events
23+
Examples: Events
24+
| option | type | default |
25+
| streamDeadlineMs | Integer | 600000 |
26+
| keepAlive | Long | 0 |
27+
| retryBackoffMs | Integer | 1000 |
28+
@sync
29+
Examples: Sync
30+
| option | type | default |
31+
| streamDeadlineMs | Integer | 600000 |
32+
| keepAlive | Long | 0 |
33+
| retryBackoffMs | Integer | 1000 |
34+
| selector | String | null |
35+
@caching
36+
Examples: caching
37+
| option | type | default |
38+
| cacheType | CacheType | lru |
39+
| maxCacheSize | Integer | 1000 |
40+
@offline
41+
Examples: offline
42+
| option | type | default |
43+
| offlineFlagSourcePath | String | null |
44+
45+
@rpc
46+
Scenario Outline: Default Config RPC
47+
When we initialize a config for "rpc"
48+
Then the option "<option>" of type "<type>" should have the value "<default>"
49+
Examples:
50+
| option | type | default |
51+
| port | Integer | 8013 |
52+
53+
@in-process
54+
Scenario Outline: Default Config In-Process
55+
When we initialize a config for "in-process"
56+
Then the option "<option>" of type "<type>" should have the value "<default>"
57+
Examples:
58+
| option | type | default |
59+
| port | Integer | 8015 |
60+
61+
Scenario Outline: Dedicated Config
62+
When we have an option "<option>" of type "<type>" with value "<value>"
63+
And we initialize a config
64+
Then the option "<option>" of type "<type>" should have the value "<value>"
65+
Examples:
66+
| option | type | value |
67+
| resolverType | ResolverType | in-process |
68+
| host | String | local |
69+
| tls | Boolean | True |
70+
| port | Integer | 1234 |
71+
| deadline | Integer | 123 |
72+
@customCert
73+
Examples:
74+
| option | type | value |
75+
| certPath | String | path |
76+
@unixsocket
77+
Examples:
78+
| option | type | value |
79+
| socketPath | String | path |
80+
@events
81+
Examples:
82+
| option | type | value |
83+
| streamDeadlineMs | Integer | 500000 |
84+
| keepAlive | Long | 5 |
85+
| retryBackoffMs | Integer | 5000 |
86+
@sync
87+
Examples:
88+
| option | type | value |
89+
| streamDeadlineMs | Integer | 500000 |
90+
| keepAlive | Long | 5 |
91+
| retryBackoffMs | Integer | 5000 |
92+
| selector | String | selector |
93+
@caching
94+
Examples:
95+
| option | type | value |
96+
| cacheType | CacheType | disabled |
97+
| maxCacheSize | Integer | 1236 |
98+
@offline
99+
Examples:
100+
| option | type | value |
101+
| offlineFlagSourcePath | String | path |
102+
103+
Scenario Outline: Dedicated Config via Env_var
104+
When we have an environment variable "<env>" with value "<value>"
105+
And we initialize a config
106+
Then the option "<option>" of type "<type>" should have the value "<value>"
107+
Examples:
108+
| option | env | type | value |
109+
| resolverType | FLAGD_RESOLVER | ResolverType | in-process |
110+
| resolverType | FLAGD_RESOLVER | ResolverType | IN-PROCESS |
111+
| resolverType | FLAGD_RESOLVER | ResolverType | rpc |
112+
| resolverType | FLAGD_RESOLVER | ResolverType | RPC |
113+
| host | FLAGD_HOST | String | local |
114+
| tls | FLAGD_TLS | Boolean | True |
115+
| port | FLAGD_PORT | Integer | 1234 |
116+
| deadline | FLAGD_DEADLINE_MS | Integer | 123 |
117+
@customCert
118+
Examples:
119+
| option | env | type | value |
120+
| certPath | FLAGD_SERVER_CERT_PATH | String | path |
121+
@unixsocket
122+
Examples:
123+
| option | env | type | value |
124+
| socketPath | FLAGD_SOCKET_PATH | String | path |
125+
@events
126+
Examples:
127+
| option | env | type | value |
128+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
129+
| keepAlive | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
130+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
131+
@sync
132+
Examples:
133+
| option | env | type | value |
134+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
135+
| keepAlive | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
136+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
137+
| selector | FLAGD_SOURCE_SELECTOR | String | selector |
138+
@caching
139+
Examples:
140+
| option | env | type | value |
141+
| cacheType | FLAGD_CACHE | CacheType | disabled |
142+
| maxCacheSize | FLAGD_MAX_CACHE_SIZE | Integer | 1236 |
143+
@offline
144+
Examples:
145+
| option | env | type | value |
146+
| offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | String | path |
147+
148+
Scenario Outline: Dedicated Config via Env_var and set
149+
When we have an environment variable "<env>" with value "<env-value>"
150+
And we have an option "<option>" of type "<type>" with value "<value>"
151+
And we initialize a config
152+
Then the option "<option>" of type "<type>" should have the value "<value>"
153+
Examples:
154+
| option | env | type | value | env-value |
155+
| resolverType | FLAGD_RESOLVER | ResolverType | in-process | rpc |
156+
| host | FLAGD_HOST | String | local | l |
157+
| tls | FLAGD_TLS | Boolean | True | False |
158+
| port | FLAGD_PORT | Integer | 1234 | 3456 |
159+
| deadline | FLAGD_DEADLINE_MS | Integer | 123 | 345 |
160+
@customCert
161+
Examples:
162+
| option | env | type | value | env-value |
163+
| certPath | FLAGD_SERVER_CERT_PATH | String | path | rpc |
164+
@unixsocket
165+
Examples:
166+
| option | env | type | value | env-value |
167+
| socketPath | FLAGD_SOCKET_PATH | String | path | rpc |
168+
@events
169+
Examples:
170+
| option | env | type | value | env-value |
171+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
172+
| keepAlive | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
173+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 400 |
174+
@sync
175+
Examples:
176+
| option | env | type | value | env-value |
177+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
178+
| keepAlive | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
179+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 400 |
180+
| selector | FLAGD_SOURCE_SELECTOR | String | selector | sele |
181+
@caching
182+
Examples:
183+
| option | env | type | value | env-value |
184+
| cacheType | FLAGD_CACHE | CacheType | disabled | lru |
185+
| maxCacheSize | FLAGD_MAX_CACHE_SIZE | Integer | 1236 | 2345 |
186+
@offline
187+
Examples:
188+
| option | env | type | value | env-value |
189+
| offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | String | path | lll |

0 commit comments

Comments
 (0)
Please sign in to comment.