From d0bf0390af1cbeb79a35192bd6f92ee258eb866e Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Fri, 6 Dec 2024 10:42:49 +0100 Subject: [PATCH] feat: rework config gherkin file The initial version of the gherkin file had some issues. It was not written in passive voice, and there have been no given states. Furthermore, it missed important fields from the flagd spec. Signed-off-by: Simon Schrottner --- gherkin/config.feature | 231 ++++++++++++++++++++++++++--------------- 1 file changed, 146 insertions(+), 85 deletions(-) diff --git a/gherkin/config.feature b/gherkin/config.feature index f2bd715..d0cefff 100644 --- a/gherkin/config.feature +++ b/gherkin/config.feature @@ -1,16 +1,45 @@ Feature: Configuration Test + """ + This is the official option configuration table + | Option name | Environment variable name | Explanation | Type & Values | Default | Compatible resolver | + | --------------------- | ------------------------------ | ------------------------------------------------------------------------------- | ---------------------------- | ----------------------------- | ------------------- | + | resolver | FLAGD_RESOLVER | mode of operation | String - `rpc`, `in-process` | rpc | rpc & in-process | + | host | FLAGD_HOST | remote host | String | localhost | rpc & in-process | + | port | FLAGD_PORT | remote port | int | 8013 (rpc), 8015 (in-process) | rpc & in-process | + | targetUri | FLAGD_TARGET_URI | alternative to host/port, supporting custom name resolution | string | null | rpc & in-process | + | tls | FLAGD_TLS | connection encryption | boolean | false | rpc & in-process | + | socketPath | FLAGD_SOCKET_PATH | alternative to host port, unix socket | String | null | rpc & in-process | + | certPath | FLAGD_SERVER_CERT_PATH | tls cert path | String | null | rpc & in-process | + | deadlineMs | FLAGD_DEADLINE_MS | deadline for unary calls, and timeout for initialization | int | 500 | rpc & in-process | + | streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | deadline for streaming calls, useful as an application-layer keepalive | int | 600000 | rpc & in-process | + | retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | initial backoff for stream retry | int | 1000 | rpc & in-process | + | retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | maximum backoff for stream retry | int | 120000 | rpc & in-process | + | retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | amount of stream retry attempts before provider moves from STALE to ERROR state | int | 5 | rpc & in-process | + | keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | http 2 keepalive | long | 0 | rpc & in-process | + | cache | FLAGD_CACHE | enable cache of static flags | String - `lru`, `disabled` | lru | rpc | + | maxCacheSize | FLAGD_MAX_CACHE_SIZE | max size of static flag cache | int | 1000 | rpc | + | selector | FLAGD_SOURCE_SELECTOR | selects a single sync source to retrieve flags from only that source | string | null | in-process | + | offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | offline, file-based flag definitions, overrides host/port/targetUri | string | null | in-process | + | offlinePollIntervalMs | FLAGD_OFFLINE_POLL_MS | poll interval for reading offlineFlagSourcePath | int | 5000 | in-process | + | contextEnricher | - | sync-metadata to evaluation context mapping function | function | identity function | in-process | + """ + @rpc @in-process Scenario Outline: Default Config - When we initialize a config + When a config was initialized Then the option "