diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..1e12754 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,124 @@ +# CLAUDE.md — ffe-system-test-data + +## Repository purpose + +This repository holds canonical fixture data for Datadog's Feature Flag Evaluation (FFE) engine. It is consumed as a git submodule by downstream tracer repos (dd-trace-java, dd-trace-py, dd-trace-dotnet, system-tests). Changes here propagate to all consumers; treat every merge to `main` as a release. + +## Repository structure + +``` +config/ + ufc-config.json # All flag definitions (UFC server format) +evaluation-cases/ + test-*.json # Evaluation scenarios, one wrapper object per file +``` + +The `config/` and `evaluation-cases/` directories are populated through feature branches. A fresh clone of `main` may not contain data files yet. + +## File formats + +### config/ufc-config.json + +UFC (Unified Flag Configuration) server format. Top-level keys: + +- `createdAt` — ISO 8601 timestamp +- `format` — always `"SERVER"` +- `environment.name` — environment label +- `flags` — map of flag key → flag definition + +Each flag definition has `key`, `enabled`, `variationType` (`BOOLEAN`, `STRING`, `INTEGER`, `NUMERIC`, `JSON`), `variations` (map of variation key → `{key, value}`), and `allocations` (ordered list of allocation rules). + +Each allocation rule has `key`, optional `rules` (targeting conditions), `splits` (variation assignments with optional shard ranges), optional `startAt`/`endAt` (ISO 8601), and `doLog` (boolean). + +### evaluation-cases/test-*.json + +Each file is a wrapper object: + +```json +{ + "skip": , // optional + "xfail": , // optional + "cases": [ ...test case objects... ] +} +``` + +Files with no annotations use the minimal form: `{"cases": [...]}`. + +#### Test case object + +```json +{ + "flag": "flag-key", + "variationType": "BOOLEAN|STRING|INTEGER|NUMERIC|JSON", + "defaultValue": , + "targetingKey": "entity-id or null", + "attributes": { "key": "value" }, + "result": { + "value": , + "reason": "TARGETING_MATCH|SPLIT|STATIC|DEFAULT|ERROR" // optional + }, + "skip": , // optional + "xfail": // optional +} +``` + +`result.reason` is optional. When omitted, consumers assert only on `result.value`. Reason code support varies by SDK implementation — verify that a downstream tracer implements a given reason code before adding reason assertions for it. + +Reason code semantics: +- `TARGETING_MATCH` — entity matched an explicit rule condition within an allocation +- `SPLIT` — entity was assigned via consistent hashing into a shard range +- `STATIC` — entity was assigned deterministically without hashing (e.g. a single split at 100%) +- `DEFAULT` — no allocation matched; default value was returned +- `DISABLED` — flag was disabled (`flag.enabled = false`) +- `ERROR` — evaluation error (flag not found, type mismatch, etc.) + +#### SkipValue + +| Value | Meaning | +|-------|---------| +| `true` | Skip on all SDKs | +| `["go", "java"]` | Skip on listed SDKs only | +| `null` | Run normally (case-level: opt out of file-level skip) | + +#### XfailValue + +| Value | Meaning | +|-------|---------| +| `true` | Expect failure on all SDKs | +| `""` | Expect failure on all SDKs, reason attached | +| `{"go": "reason", "dotnet": true}` | Expect failure on listed SDKs, per-SDK reason | +| `null` | Run normally (case-level: opt out of file-level xfail) | + +#### Canonical SDK identifiers + +`"go"`, `"java"`, `"python"`, `"dotnet"` + +#### Precedence rules + +1. Case-level overrides file-level. +2. `null` at case-level opts that case back in to normal execution. +3. `skip` takes precedence over `xfail` when both apply. + +## Adding or modifying test data + +1. To add a new test scenario, create `evaluation-cases/test-.json` as a wrapper object with a `cases` array. +2. If the scenario requires a new flag, add the flag definition to `config/ufc-config.json`. +3. Every `flag` value in an evaluation case must correspond to a key in `config/ufc-config.json`. +4. Validate all JSON files before opening a PR. Use `jq . path/to/file.json` or `python -m json.tool path/to/file.json` to catch syntax errors. No automated schema validator is currently enforced in CI. +5. After your PR merges to `main`, open follow-up PRs in each downstream repo to advance the submodule pointer. + +## Downstream submodule update workflow + +Run from the downstream repo root: + +```bash +git submodule update --remote path/to/ffe-data +git add path/to/ffe-data +git commit -m "Update ffe-system-test-data submodule" +``` + +Repeat for each consumer: system-tests, dd-trace-py, dd-trace-java, dd-trace-dotnet. + +## Code ownership + +All changes require review from `@DataDog/feature-flagging-and-experimentation-sdk`. diff --git a/README.md b/README.md index dbaa62d..d612e3a 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,77 @@ Canonical test fixtures for Datadog's Feature Flag Evaluation (FFE) system, shar ## Contents - `ufc-config.json` -- UFC (Unified Feature Configuration) server payload used by all evaluation test cases -- `evaluation-cases/` -- 24 JSON fixture files, each containing an array of evaluation test cases +- `evaluation-cases/` -- 25 JSON fixture files, each a wrapper object containing evaluation test cases ## Fixture Schema -Each evaluation case uses a universal schema with the following fields: +### File format + +Each `evaluation-cases/test-*.json` file is a wrapper object: + +```json +{ + "skip": , // optional + "xfail": , // optional + "cases": [ ...test case objects... ] +} +``` + +When neither `skip` nor `xfail` is present the file uses the minimal form: + +```json +{ "cases": [ ...test case objects... ] } +``` + +### Test case fields + +Each test case object uses a universal schema: | Field | Type | Description | |-------|------|-------------| | `flag` | string | The flag key to evaluate | -| `variationType` | string | Expected type: `BOOLEAN`, `STRING`, `INTEGER`, `DOUBLE`, `JSON` | +| `variationType` | string | Expected type: `BOOLEAN`, `STRING`, `INTEGER`, `NUMERIC`, `JSON` | | `defaultValue` | any | The default value passed to the evaluation call | | `targetingKey` | string | The subject/user identifier for evaluation | | `attributes` | object | Additional context attributes for targeting rules | | `result.value` | any | The expected evaluation result value | | `result.reason` | string | The expected OpenFeature reason: `STATIC`, `SPLIT`, `TARGETING_MATCH`, `DEFAULT`, `ERROR`, `DISABLED` | +| `skip` | SkipValue | Optional. Override file-level skip for this case. | +| `xfail` | XfailValue | Optional. Override file-level xfail for this case. | + +### `skip` and `xfail` annotation fields + +These fields appear at both the file level (on the wrapper object) and the case level (on individual test case objects). They let SDK test runners adjust behavior without modifying canonical test data. + +**SkipValue** — controls whether the SDK executes a test: + +| Value | Meaning | +|-------|---------| +| `true` | Skip on all SDKs | +| `["go", "java"]` | Skip on the listed SDKs only | +| `null` | Run normally (use at case-level to opt out of a file-level skip) | + +**XfailValue** — marks a test as expected to fail: + +| Value | Meaning | +|-------|---------| +| `true` | Expect failure on all SDKs | +| `""` | Expect failure on all SDKs, reason attached | +| `{"go": "reason", "dotnet": true}` | Expect failure on listed SDKs only, per-SDK reason | +| `null` | Run normally (use at case-level to opt out of a file-level xfail) | + +**Canonical SDK identifiers:** `"go"`, `"java"`, `"python"`, `"dotnet"` + +**Precedence rules:** +1. Case-level overrides file-level. +2. `null` at case-level opts that case back in to normal execution. +3. `skip` takes precedence over `xfail` when both apply to the same SDK. + +**SDK behavior:** +- `skip`: do not execute the assertion; report as skipped/pending; does not count as pass or fail. +- `xfail`: execute the assertion; failure → report as expected failure (run passes); pass → report as unexpected pass (SDKs may treat this as a test failure). + +See `evaluation-cases/test-case-regex-flag.json` for a worked example showing file-level `xfail` with a case-level `null` override. ### SDK-Specific Fields @@ -40,9 +96,11 @@ git submodule update --init ### In Tests 1. Load `ufc-config.json` to initialize your UFC evaluator -2. For each file in `evaluation-cases/`, parse the JSON array -3. For each test case, call your evaluator with `flag`, `defaultValue`, `targetingKey`, and `attributes` -4. Assert the result matches `result.value` and `result.reason` +2. For each file in `evaluation-cases/`, parse the wrapper object and read the `cases` array +3. Apply `skip`/`xfail` annotations (file-level and case-level) for your SDK identifier +4. For each non-skipped case, call your evaluator with `flag`, `defaultValue`, `targetingKey`, and `attributes` +5. Assert the result matches `result.value` and `result.reason` +6. For xfail cases: treat assertion failures as expected failures; treat assertion passes as unexpected passes ## Evaluation Cases @@ -62,7 +120,8 @@ git submodule update --init | `test-case-new-user-onboarding-flag.json` | Multi-allocation onboarding flag with sharding | | `test-case-no-allocations-flag.json` | Flag with no allocations (returns default) | | `test-case-null-operator-flag.json` | Flag using IS_NULL operator | -| `test-case-numeric-flag.json` | Numeric (double) flag evaluation | +| `test-case-null-targeting-key.json` | Evaluation with null targeting key | +| `test-case-numeric-flag.json` | Numeric flag evaluation | | `test-case-numeric-one-of.json` | Numeric ONE_OF operator matching | | `test-case-of-7-empty-targeting-key.json` | Evaluation with empty targeting key | | `test-case-regex-flag.json` | Flag using regex matching operator | diff --git a/docs/superpowers/specs/2026-04-22-skip-xfail-design.md b/docs/superpowers/specs/2026-04-22-skip-xfail-design.md new file mode 100644 index 0000000..467a5fe --- /dev/null +++ b/docs/superpowers/specs/2026-04-22-skip-xfail-design.md @@ -0,0 +1,234 @@ +# skip / xfail annotation fields for ffe-system-test-data + +**Date:** 2026-04-22 +**Status:** approved +**Scope:** `evaluation-cases/test-*.json` schema + +--- + +## Motivation + +The evaluation test cases in this repository are executed by multiple SDK test runners (Go, Java, Python, .NET). Some SDKs have known behavioral divergences or unimplemented features that make specific test cases inapplicable or expected to fail on that SDK only. Today there is no way to express this — the test runner either runs the case (and may fail) or skips the entire file by convention. + +This design adds two optional annotation fields — `skip` and `xfail` — at two hierarchical levels: the test file and the individual test case. SDK test runners use these fields to adjust their behavior without modifying the canonical test data. + +--- + +## Schema + +### File-level wrapper object + +Each `evaluation-cases/test-*.json` file currently contains a bare JSON array. The new format wraps that array in an object with optional annotation fields and a required `cases` key. + +**This is a breaking change.** All consuming SDK test runners must be updated to parse the new format. + +```json +{ + "skip": , + "xfail": , + "cases": [ ...test case objects... ] +} +``` + +Both `skip` and `xfail` are optional at the file level. When both are absent the file contains a plain wrapper: + +```json +{ + "cases": [ ...test case objects... ] +} +``` + +### Case-level fields + +Each test case object may carry optional `skip` and/or `xfail` fields alongside the existing `flag`, `variationType`, `defaultValue`, `targetingKey`, `attributes`, and `result` fields. + +```json +{ + "flag": "regex-flag", + "variationType": "STRING", + "defaultValue": "default", + "targetingKey": "alice", + "attributes": { "email": "alice@example.com" }, + "result": { "value": "on", "reason": "TARGETING_MATCH" }, + "skip": , + "xfail": +} +``` + +### Value types + +#### `SkipValue` + +| Value | Meaning | +|---|---| +| `true` | Skip this case/file on all SDKs | +| `["go", "java"]` | Skip on the listed SDKs only | +| `null` | Explicitly run normally (used at case-level to override a file-level skip) | + +#### `XfailValue` + +| Value | Meaning | +|---|---| +| `true` | Expect failure on all SDKs, no reason given | +| `""` | Expect failure on all SDKs, reason attached | +| `{"go": "reason", "dotnet": "reason"}` | Expect failure only on the listed SDKs, per-SDK reason | +| `{"go": true}` | Expect failure on `go` only, no reason | +| `null` | Explicitly run normally (used at case-level to override a file-level xfail) | + +### Canonical SDK identifiers + +| SDK | Identifier | +|---|---| +| Go tracer | `"go"` | +| Java tracer | `"java"` | +| Python tracer | `"python"` | +| .NET tracer | `"dotnet"` | + +SDK test runners must know their own identifier and match it against annotation values. + +--- + +## Precedence rules + +1. **Case-level overrides file-level.** When both levels define an annotation, the case-level value wins unconditionally. +2. **`null` means "run normally."** Setting `"skip": null` or `"xfail": null` at the case level explicitly opts that case back in, even if the file-level annotation would otherwise apply. +3. **`skip` takes precedence over `xfail`.** If both are set (at the same effective level after override resolution) and both apply to the current SDK, the SDK treats the case as skipped (does not run it at all). + +Effective annotation resolution algorithm per case, per SDK: + +``` +case_skip = resolve(case.skip, sdk_id) # null if not set +file_skip = resolve(file.skip, sdk_id) # null if not set +case_xfail = resolve(case.xfail, sdk_id) # null if not set +file_xfail = resolve(file.xfail, sdk_id) # null if not set + +effective_skip = case.skip IS PRESENT ? case_skip : file_skip +effective_xfail = case.xfail IS PRESENT ? case_xfail : file_xfail + +if effective_skip → SKIP (do not run) +if effective_xfail → run, expect failure +otherwise → run, expect pass +``` + +`resolve(value, sdk_id)`: +- `true` → `true` (applies to all SDKs) +- `""` → `""` (applies to all SDKs, reason attached) +- `[...]` → `true` if `sdk_id` in list, else `null` +- `{...}` → value at `sdk_id` key if present, else `null` +- `null` or absent → `null` + +--- + +## Consumer SDK behavior spec + +### `skip` + +- The SDK test runner **does not execute** the assertion for this case. +- The case is reported as **skipped / pending** in the test output. +- It does **not** count as a pass or failure. +- The SDK must not error if `skip` is present and applies to it. + +### `xfail` + +- The SDK test runner **executes** the assertion. +- If the assertion **fails** → report as **expected failure** (the overall test run passes). +- If the assertion **passes** → report as **unexpected pass**. SDKs may treat this as a test failure (recommended) or a warning, depending on the test framework's conventions. +- If a `reason` string is available (from a string or object value), include it in the test output. + +--- + +## Migration notes + +### This repository + +1. All `evaluation-cases/test-*.json` files must be updated from bare arrays to the wrapper object format. +2. Files with no annotations use the minimal wrapper: `{"cases": [...]}`. +3. README.md and CLAUDE.md must be updated to document the new schema. + +### Consuming repos (one PR each) + +| Repo | Change | +|---|---| +| `dd-trace-go` | Update parser to unwrap `cases` array; implement skip/xfail handling | +| `dd-trace-java` (`DDEvaluatorFixtureTest.java`) | Same | +| `dd-trace-py` | Same | +| `dd-trace-dotnet` | Same | +| `system-tests` | Same | + +Each consuming repo should update the submodule pointer **after** updating its parser, not before, to avoid broken CI. + +--- + +## Before / after example + +### Before (current format) + +`evaluation-cases/test-case-regex-flag.json`: +```json +[ + { + "flag": "regex-flag", + "variationType": "STRING", + "defaultValue": "unknown", + "targetingKey": "alice", + "attributes": { "email": "alice@example.com" }, + "result": { "value": "on", "reason": "TARGETING_MATCH" } + }, + { + "flag": "regex-flag", + "variationType": "STRING", + "defaultValue": "unknown", + "targetingKey": "bob", + "attributes": { "email": "bob@example.com" }, + "result": { "value": "unknown" } + } +] +``` + +### After (new format, with annotations) + +```json +{ + "xfail": { "dotnet": "regex MATCHES operator not yet implemented" }, + "cases": [ + { + "flag": "regex-flag", + "variationType": "STRING", + "defaultValue": "unknown", + "targetingKey": "alice", + "attributes": { "email": "alice@example.com" }, + "result": { "value": "on", "reason": "TARGETING_MATCH" } + }, + { + "flag": "regex-flag", + "variationType": "STRING", + "defaultValue": "unknown", + "targetingKey": "bob", + "attributes": { "email": "bob@example.com" }, + "result": { "value": "unknown" }, + "xfail": null + } + ] +} +``` + +In this example: +- The file-level `xfail` marks all cases as expected to fail on `dotnet`. +- The second case overrides with `"xfail": null`, opting it back in to run normally on all SDKs (including dotnet). + +### After (new format, no annotations — minimal wrapper) + +```json +{ + "cases": [ + { + "flag": "regex-flag", + "variationType": "STRING", + "defaultValue": "unknown", + "targetingKey": "alice", + "attributes": { "email": "alice@example.com" }, + "result": { "value": "on", "reason": "TARGETING_MATCH" } + } + ] +} +``` diff --git a/evaluation-cases/test-case-boolean-false-assignment.json b/evaluation-cases/test-case-boolean-false-assignment.json index ab718f5..dc89e5a 100644 --- a/evaluation-cases/test-case-boolean-false-assignment.json +++ b/evaluation-cases/test-case-boolean-false-assignment.json @@ -1,41 +1,43 @@ -[ - { - "attributes": { - "should_disable_feature": true +{ + "cases": [ + { + "attributes": { + "should_disable_feature": true + }, + "defaultValue": true, + "flag": "boolean-false-assignment", + "result": { + "reason": "TARGETING_MATCH", + "value": false + }, + "targetingKey": "alice", + "variationType": "BOOLEAN" }, - "defaultValue": true, - "flag": "boolean-false-assignment", - "result": { - "reason": "TARGETING_MATCH", - "value": false + { + "attributes": { + "should_disable_feature": false + }, + "defaultValue": true, + "flag": "boolean-false-assignment", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "bob", + "variationType": "BOOLEAN" }, - "targetingKey": "alice", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "should_disable_feature": false - }, - "defaultValue": true, - "flag": "boolean-false-assignment", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "bob", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "unknown_attribute": "value" - }, - "defaultValue": true, - "flag": "boolean-false-assignment", - "result": { - "reason": "DEFAULT", - "value": true - }, - "targetingKey": "charlie", - "variationType": "BOOLEAN" - } -] + { + "attributes": { + "unknown_attribute": "value" + }, + "defaultValue": true, + "flag": "boolean-false-assignment", + "result": { + "reason": "DEFAULT", + "value": true + }, + "targetingKey": "charlie", + "variationType": "BOOLEAN" + } + ] +} diff --git a/evaluation-cases/test-case-boolean-one-of-matches.json b/evaluation-cases/test-case-boolean-one-of-matches.json index 392ec97..e6032ed 100644 --- a/evaluation-cases/test-case-boolean-one-of-matches.json +++ b/evaluation-cases/test-case-boolean-one-of-matches.json @@ -1,208 +1,210 @@ -[ - { - "attributes": { - "one_of_flag": true - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "TARGETING_MATCH", - "value": 1 - }, - "targetingKey": "alice", - "variationType": "INTEGER" - }, - { - "attributes": { - "one_of_flag": false - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "bob", - "variationType": "INTEGER" - }, - { - "attributes": { - "one_of_flag": "True" - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "charlie", - "variationType": "INTEGER" - }, - { - "attributes": { - "matches_flag": true - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "TARGETING_MATCH", - "value": 2 - }, - "targetingKey": "derek", - "variationType": "INTEGER" - }, - { - "attributes": { - "matches_flag": false - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "erica", - "variationType": "INTEGER" - }, - { - "attributes": { - "not_matches_flag": false - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "frank", - "variationType": "INTEGER" - }, - { - "attributes": { - "not_matches_flag": true - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "TARGETING_MATCH", - "value": 4 - }, - "targetingKey": "george", - "variationType": "INTEGER" - }, - { - "attributes": { - "not_matches_flag": "False" - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "TARGETING_MATCH", - "value": 4 - }, - "targetingKey": "haley", - "variationType": "INTEGER" - }, - { - "attributes": { - "not_one_of_flag": true - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "TARGETING_MATCH", - "value": 3 - }, - "targetingKey": "ivy", - "variationType": "INTEGER" - }, - { - "attributes": { - "not_one_of_flag": false - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "julia", - "variationType": "INTEGER" - }, - { - "attributes": { - "not_one_of_flag": "False" - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "TARGETING_MATCH", - "value": 3 - }, - "targetingKey": "kim", - "variationType": "INTEGER" - }, - { - "attributes": { - "not_one_of_flag": "true" - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "TARGETING_MATCH", - "value": 3 - }, - "targetingKey": "lucas", - "variationType": "INTEGER" - }, - { - "attributes": { - "not_one_of_flag": "false" - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "mike", - "variationType": "INTEGER" - }, - { - "attributes": { - "null_flag": "null" - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "TARGETING_MATCH", - "value": 5 - }, - "targetingKey": "nicole", - "variationType": "INTEGER" - }, - { - "attributes": { - "null_flag": null - }, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "owen", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "boolean-one-of-matches", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "pete", - "variationType": "INTEGER" - } -] +{ + "cases": [ + { + "attributes": { + "one_of_flag": true + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "TARGETING_MATCH", + "value": 1 + }, + "targetingKey": "alice", + "variationType": "INTEGER" + }, + { + "attributes": { + "one_of_flag": false + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "bob", + "variationType": "INTEGER" + }, + { + "attributes": { + "one_of_flag": "True" + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "charlie", + "variationType": "INTEGER" + }, + { + "attributes": { + "matches_flag": true + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "TARGETING_MATCH", + "value": 2 + }, + "targetingKey": "derek", + "variationType": "INTEGER" + }, + { + "attributes": { + "matches_flag": false + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "erica", + "variationType": "INTEGER" + }, + { + "attributes": { + "not_matches_flag": false + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "frank", + "variationType": "INTEGER" + }, + { + "attributes": { + "not_matches_flag": true + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "TARGETING_MATCH", + "value": 4 + }, + "targetingKey": "george", + "variationType": "INTEGER" + }, + { + "attributes": { + "not_matches_flag": "False" + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "TARGETING_MATCH", + "value": 4 + }, + "targetingKey": "haley", + "variationType": "INTEGER" + }, + { + "attributes": { + "not_one_of_flag": true + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "TARGETING_MATCH", + "value": 3 + }, + "targetingKey": "ivy", + "variationType": "INTEGER" + }, + { + "attributes": { + "not_one_of_flag": false + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "julia", + "variationType": "INTEGER" + }, + { + "attributes": { + "not_one_of_flag": "False" + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "TARGETING_MATCH", + "value": 3 + }, + "targetingKey": "kim", + "variationType": "INTEGER" + }, + { + "attributes": { + "not_one_of_flag": "true" + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "TARGETING_MATCH", + "value": 3 + }, + "targetingKey": "lucas", + "variationType": "INTEGER" + }, + { + "attributes": { + "not_one_of_flag": "false" + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "mike", + "variationType": "INTEGER" + }, + { + "attributes": { + "null_flag": "null" + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "TARGETING_MATCH", + "value": 5 + }, + "targetingKey": "nicole", + "variationType": "INTEGER" + }, + { + "attributes": { + "null_flag": null + }, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "owen", + "variationType": "INTEGER" + }, + { + "attributes": {}, + "defaultValue": 0, + "flag": "boolean-one-of-matches", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "pete", + "variationType": "INTEGER" + } + ] +} diff --git a/evaluation-cases/test-case-comparator-operator-flag.json b/evaluation-cases/test-case-comparator-operator-flag.json index e4daa2d..1e7485a 100644 --- a/evaluation-cases/test-case-comparator-operator-flag.json +++ b/evaluation-cases/test-case-comparator-operator-flag.json @@ -1,69 +1,71 @@ -[ - { - "attributes": { - "country": "US", - "size": 5 +{ + "cases": [ + { + "attributes": { + "country": "US", + "size": 5 + }, + "defaultValue": "unknown", + "flag": "comparator-operator-test", + "result": { + "reason": "TARGETING_MATCH", + "value": "small" + }, + "targetingKey": "alice", + "variationType": "STRING" }, - "defaultValue": "unknown", - "flag": "comparator-operator-test", - "result": { - "reason": "TARGETING_MATCH", - "value": "small" + { + "attributes": { + "country": "Canada", + "size": 10 + }, + "defaultValue": "unknown", + "flag": "comparator-operator-test", + "result": { + "reason": "TARGETING_MATCH", + "value": "medium" + }, + "targetingKey": "bob", + "variationType": "STRING" }, - "targetingKey": "alice", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Canada", - "size": 10 + { + "attributes": { + "size": 25 + }, + "defaultValue": "unknown", + "flag": "comparator-operator-test", + "result": { + "reason": "DEFAULT", + "value": "unknown" + }, + "targetingKey": "charlie", + "variationType": "STRING" }, - "defaultValue": "unknown", - "flag": "comparator-operator-test", - "result": { - "reason": "TARGETING_MATCH", - "value": "medium" + { + "attributes": { + "size": 26 + }, + "defaultValue": "unknown", + "flag": "comparator-operator-test", + "result": { + "reason": "TARGETING_MATCH", + "value": "large" + }, + "targetingKey": "david", + "variationType": "STRING" }, - "targetingKey": "bob", - "variationType": "STRING" - }, - { - "attributes": { - "size": 25 - }, - "defaultValue": "unknown", - "flag": "comparator-operator-test", - "result": { - "reason": "DEFAULT", - "value": "unknown" - }, - "targetingKey": "charlie", - "variationType": "STRING" - }, - { - "attributes": { - "size": 26 - }, - "defaultValue": "unknown", - "flag": "comparator-operator-test", - "result": { - "reason": "TARGETING_MATCH", - "value": "large" - }, - "targetingKey": "david", - "variationType": "STRING" - }, - { - "attributes": { - "country": "UK" - }, - "defaultValue": "unknown", - "flag": "comparator-operator-test", - "result": { - "reason": "DEFAULT", - "value": "unknown" - }, - "targetingKey": "elize", - "variationType": "STRING" - } -] + { + "attributes": { + "country": "UK" + }, + "defaultValue": "unknown", + "flag": "comparator-operator-test", + "result": { + "reason": "DEFAULT", + "value": "unknown" + }, + "targetingKey": "elize", + "variationType": "STRING" + } + ] +} diff --git a/evaluation-cases/test-case-disabled-flag.json b/evaluation-cases/test-case-disabled-flag.json index 208e5c9..f81ca9b 100644 --- a/evaluation-cases/test-case-disabled-flag.json +++ b/evaluation-cases/test-case-disabled-flag.json @@ -1,43 +1,45 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": 0, + "flag": "disabled_flag", + "result": { + "reason": "DISABLED", + "value": 0 + }, + "targetingKey": "alice", + "variationType": "INTEGER" }, - "defaultValue": 0, - "flag": "disabled_flag", - "result": { - "reason": "DISABLED", - "value": 0 + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": 0, + "flag": "disabled_flag", + "result": { + "reason": "DISABLED", + "value": 0 + }, + "targetingKey": "bob", + "variationType": "INTEGER" }, - "targetingKey": "alice", - "variationType": "INTEGER" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" - }, - "defaultValue": 0, - "flag": "disabled_flag", - "result": { - "reason": "DISABLED", - "value": 0 - }, - "targetingKey": "bob", - "variationType": "INTEGER" - }, - { - "attributes": { - "age": 50 - }, - "defaultValue": 0, - "flag": "disabled_flag", - "result": { - "reason": "DISABLED", - "value": 0 - }, - "targetingKey": "charlie", - "variationType": "INTEGER" - } -] + { + "attributes": { + "age": 50 + }, + "defaultValue": 0, + "flag": "disabled_flag", + "result": { + "reason": "DISABLED", + "value": 0 + }, + "targetingKey": "charlie", + "variationType": "INTEGER" + } + ] +} diff --git a/evaluation-cases/test-case-empty-flag.json b/evaluation-cases/test-case-empty-flag.json index 18ee538..0968f58 100644 --- a/evaluation-cases/test-case-empty-flag.json +++ b/evaluation-cases/test-case-empty-flag.json @@ -1,43 +1,45 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": "default_value", + "flag": "empty_flag", + "result": { + "reason": "DEFAULT", + "value": "default_value" + }, + "targetingKey": "alice", + "variationType": "STRING" }, - "defaultValue": "default_value", - "flag": "empty_flag", - "result": { - "reason": "DEFAULT", - "value": "default_value" + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": "default_value", + "flag": "empty_flag", + "result": { + "reason": "DEFAULT", + "value": "default_value" + }, + "targetingKey": "bob", + "variationType": "STRING" }, - "targetingKey": "alice", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" - }, - "defaultValue": "default_value", - "flag": "empty_flag", - "result": { - "reason": "DEFAULT", - "value": "default_value" - }, - "targetingKey": "bob", - "variationType": "STRING" - }, - { - "attributes": { - "age": 50 - }, - "defaultValue": "default_value", - "flag": "empty_flag", - "result": { - "reason": "DEFAULT", - "value": "default_value" - }, - "targetingKey": "charlie", - "variationType": "STRING" - } -] + { + "attributes": { + "age": 50 + }, + "defaultValue": "default_value", + "flag": "empty_flag", + "result": { + "reason": "DEFAULT", + "value": "default_value" + }, + "targetingKey": "charlie", + "variationType": "STRING" + } + ] +} diff --git a/evaluation-cases/test-case-empty-string-variation.json b/evaluation-cases/test-case-empty-string-variation.json index f1fa399..da3e1c4 100644 --- a/evaluation-cases/test-case-empty-string-variation.json +++ b/evaluation-cases/test-case-empty-string-variation.json @@ -1,41 +1,43 @@ -[ - { - "attributes": { - "content_type": "minimal" +{ + "cases": [ + { + "attributes": { + "content_type": "minimal" + }, + "defaultValue": "default_value", + "flag": "empty-string-variation", + "result": { + "reason": "TARGETING_MATCH", + "value": "" + }, + "targetingKey": "empty_user", + "variationType": "STRING" }, - "defaultValue": "default_value", - "flag": "empty-string-variation", - "result": { - "reason": "TARGETING_MATCH", - "value": "" + { + "attributes": { + "content_type": "full" + }, + "defaultValue": "default_value", + "flag": "empty-string-variation", + "result": { + "reason": "TARGETING_MATCH", + "value": "detailed_content" + }, + "targetingKey": "full_user", + "variationType": "STRING" }, - "targetingKey": "empty_user", - "variationType": "STRING" - }, - { - "attributes": { - "content_type": "full" - }, - "defaultValue": "default_value", - "flag": "empty-string-variation", - "result": { - "reason": "TARGETING_MATCH", - "value": "detailed_content" - }, - "targetingKey": "full_user", - "variationType": "STRING" - }, - { - "attributes": { - "content_type": "unknown" - }, - "defaultValue": "default_value", - "flag": "empty-string-variation", - "result": { - "reason": "DEFAULT", - "value": "default_value" - }, - "targetingKey": "default_user", - "variationType": "STRING" - } -] + { + "attributes": { + "content_type": "unknown" + }, + "defaultValue": "default_value", + "flag": "empty-string-variation", + "result": { + "reason": "DEFAULT", + "value": "default_value" + }, + "targetingKey": "default_user", + "variationType": "STRING" + } + ] +} diff --git a/evaluation-cases/test-case-falsy-value-assignments.json b/evaluation-cases/test-case-falsy-value-assignments.json index 6a8cee5..ce9e485 100644 --- a/evaluation-cases/test-case-falsy-value-assignments.json +++ b/evaluation-cases/test-case-falsy-value-assignments.json @@ -1,41 +1,43 @@ -[ - { - "attributes": { - "plan_tier": "free" +{ + "cases": [ + { + "attributes": { + "plan_tier": "free" + }, + "defaultValue": 999, + "flag": "falsy-value-assignments", + "result": { + "reason": "TARGETING_MATCH", + "value": 0 + }, + "targetingKey": "zero_user", + "variationType": "INTEGER" }, - "defaultValue": 999, - "flag": "falsy-value-assignments", - "result": { - "reason": "TARGETING_MATCH", - "value": 0 + { + "attributes": { + "plan_tier": "premium" + }, + "defaultValue": 999, + "flag": "falsy-value-assignments", + "result": { + "reason": "TARGETING_MATCH", + "value": 100 + }, + "targetingKey": "premium_user", + "variationType": "INTEGER" }, - "targetingKey": "zero_user", - "variationType": "INTEGER" - }, - { - "attributes": { - "plan_tier": "premium" - }, - "defaultValue": 999, - "flag": "falsy-value-assignments", - "result": { - "reason": "TARGETING_MATCH", - "value": 100 - }, - "targetingKey": "premium_user", - "variationType": "INTEGER" - }, - { - "attributes": { - "plan_tier": "trial" - }, - "defaultValue": 999, - "flag": "falsy-value-assignments", - "result": { - "reason": "DEFAULT", - "value": 999 - }, - "targetingKey": "unknown_user", - "variationType": "INTEGER" - } -] + { + "attributes": { + "plan_tier": "trial" + }, + "defaultValue": 999, + "flag": "falsy-value-assignments", + "result": { + "reason": "DEFAULT", + "value": 999 + }, + "targetingKey": "unknown_user", + "variationType": "INTEGER" + } + ] +} diff --git a/evaluation-cases/test-case-flag-with-empty-string.json b/evaluation-cases/test-case-flag-with-empty-string.json index 6a5d9cd..f5448b7 100644 --- a/evaluation-cases/test-case-flag-with-empty-string.json +++ b/evaluation-cases/test-case-flag-with-empty-string.json @@ -1,26 +1,28 @@ -[ - { - "attributes": { - "country": "US" +{ + "cases": [ + { + "attributes": { + "country": "US" + }, + "defaultValue": "default", + "flag": "empty_string_flag", + "result": { + "reason": "TARGETING_MATCH", + "value": "" + }, + "targetingKey": "alice", + "variationType": "STRING" }, - "defaultValue": "default", - "flag": "empty_string_flag", - "result": { - "reason": "TARGETING_MATCH", - "value": "" - }, - "targetingKey": "alice", - "variationType": "STRING" - }, - { - "attributes": {}, - "defaultValue": "default", - "flag": "empty_string_flag", - "result": { - "reason": "SPLIT", - "value": "non_empty" - }, - "targetingKey": "bob", - "variationType": "STRING" - } -] + { + "attributes": {}, + "defaultValue": "default", + "flag": "empty_string_flag", + "result": { + "reason": "SPLIT", + "value": "non_empty" + }, + "targetingKey": "bob", + "variationType": "STRING" + } + ] +} diff --git a/evaluation-cases/test-case-integer-flag.json b/evaluation-cases/test-case-integer-flag.json index 8ff11ae..5811bf2 100644 --- a/evaluation-cases/test-case-integer-flag.json +++ b/evaluation-cases/test-case-integer-flag.json @@ -1,267 +1,269 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "TARGETING_MATCH", + "value": 3 + }, + "targetingKey": "alice", + "variationType": "INTEGER" }, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "TARGETING_MATCH", - "value": 3 + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "TARGETING_MATCH", + "value": 3 + }, + "targetingKey": "bob", + "variationType": "INTEGER" }, - "targetingKey": "alice", - "variationType": "INTEGER" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" + { + "attributes": { + "age": 50 + }, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "charlie", + "variationType": "INTEGER" }, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "TARGETING_MATCH", - "value": 3 + { + "attributes": { + "age": 25, + "country": "Mexico", + "email": "test@test.com" + }, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "TARGETING_MATCH", + "value": 3 + }, + "targetingKey": "debra", + "variationType": "INTEGER" }, - "targetingKey": "bob", - "variationType": "INTEGER" - }, - { - "attributes": { - "age": 50 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "1", + "variationType": "INTEGER" }, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "2", + "variationType": "INTEGER" }, - "targetingKey": "charlie", - "variationType": "INTEGER" - }, - { - "attributes": { - "age": 25, - "country": "Mexico", - "email": "test@test.com" + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "3", + "variationType": "INTEGER" }, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "TARGETING_MATCH", - "value": 3 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "4", + "variationType": "INTEGER" }, - "targetingKey": "debra", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 1 + }, + "targetingKey": "5", + "variationType": "INTEGER" }, - "targetingKey": "1", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "6", + "variationType": "INTEGER" }, - "targetingKey": "2", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 1 + }, + "targetingKey": "7", + "variationType": "INTEGER" }, - "targetingKey": "3", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 1 + }, + "targetingKey": "8", + "variationType": "INTEGER" }, - "targetingKey": "4", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 1 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "9", + "variationType": "INTEGER" }, - "targetingKey": "5", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "10", + "variationType": "INTEGER" }, - "targetingKey": "6", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 1 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 1 + }, + "targetingKey": "11", + "variationType": "INTEGER" }, - "targetingKey": "7", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 1 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 1 + }, + "targetingKey": "12", + "variationType": "INTEGER" }, - "targetingKey": "8", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "13", + "variationType": "INTEGER" }, - "targetingKey": "9", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 1 + }, + "targetingKey": "14", + "variationType": "INTEGER" }, - "targetingKey": "10", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 1 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "15", + "variationType": "INTEGER" }, - "targetingKey": "11", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 1 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 2 + }, + "targetingKey": "16", + "variationType": "INTEGER" }, - "targetingKey": "12", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 1 + }, + "targetingKey": "17", + "variationType": "INTEGER" }, - "targetingKey": "13", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 1 + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 1 + }, + "targetingKey": "18", + "variationType": "INTEGER" }, - "targetingKey": "14", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 - }, - "targetingKey": "15", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 2 - }, - "targetingKey": "16", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 1 - }, - "targetingKey": "17", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 1 - }, - "targetingKey": "18", - "variationType": "INTEGER" - }, - { - "attributes": {}, - "defaultValue": 0, - "flag": "integer-flag", - "result": { - "reason": "SPLIT", - "value": 1 - }, - "targetingKey": "19", - "variationType": "INTEGER" - } -] + { + "attributes": {}, + "defaultValue": 0, + "flag": "integer-flag", + "result": { + "reason": "SPLIT", + "value": 1 + }, + "targetingKey": "19", + "variationType": "INTEGER" + } + ] +} diff --git a/evaluation-cases/test-case-kill-switch-flag.json b/evaluation-cases/test-case-kill-switch-flag.json index 3af700d..9f9123c 100644 --- a/evaluation-cases/test-case-kill-switch-flag.json +++ b/evaluation-cases/test-case-kill-switch-flag.json @@ -1,314 +1,316 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "alice", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "bob", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "canada", - "email": "barbara@example.com" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "barbara", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "age": 40 - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "charlie", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "age": 25, - "country": "Mexico", - "email": "test@test.com" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "debra", - "variationType": "BOOLEAN" - }, - { - "attributes": {}, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "1", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "Mexico" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "2", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "age": 50, - "country": "UK" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "3", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "Germany" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "4", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "Germany" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "5", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "Germany" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "6", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "age": 12, - "country": "US" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "7", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "age": 60, - "country": "Italy" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "8", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "email": "email@email.com" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "9", - "variationType": "BOOLEAN" - }, - { - "attributes": {}, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "10", - "variationType": "BOOLEAN" - }, - { - "attributes": {}, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "11", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "US" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "12", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "Canada" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "TARGETING_MATCH", - "value": true - }, - "targetingKey": "13", - "variationType": "BOOLEAN" - }, - { - "attributes": {}, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "14", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "Denmark" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "15", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "Norway" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "16", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "UK" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "17", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "UK" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "18", - "variationType": "BOOLEAN" - }, - { - "attributes": { - "country": "UK" - }, - "defaultValue": false, - "flag": "kill-switch", - "result": { - "reason": "STATIC", - "value": false - }, - "targetingKey": "19", - "variationType": "BOOLEAN" - } -] +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "alice", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "bob", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "canada", + "email": "barbara@example.com" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "barbara", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "age": 40 + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "charlie", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "age": 25, + "country": "Mexico", + "email": "test@test.com" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "debra", + "variationType": "BOOLEAN" + }, + { + "attributes": {}, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "1", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "Mexico" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "2", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "age": 50, + "country": "UK" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "3", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "Germany" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "4", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "Germany" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "5", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "Germany" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "6", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "age": 12, + "country": "US" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "7", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "age": 60, + "country": "Italy" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "8", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "email": "email@email.com" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "9", + "variationType": "BOOLEAN" + }, + { + "attributes": {}, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "10", + "variationType": "BOOLEAN" + }, + { + "attributes": {}, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "11", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "US" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "12", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "Canada" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "TARGETING_MATCH", + "value": true + }, + "targetingKey": "13", + "variationType": "BOOLEAN" + }, + { + "attributes": {}, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "14", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "Denmark" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "15", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "Norway" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "16", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "UK" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "17", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "UK" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "18", + "variationType": "BOOLEAN" + }, + { + "attributes": { + "country": "UK" + }, + "defaultValue": false, + "flag": "kill-switch", + "result": { + "reason": "STATIC", + "value": false + }, + "targetingKey": "19", + "variationType": "BOOLEAN" + } + ] +} diff --git a/evaluation-cases/test-case-microsecond-date-flag.json b/evaluation-cases/test-case-microsecond-date-flag.json index a7bfab4..fcfcdaa 100644 --- a/evaluation-cases/test-case-microsecond-date-flag.json +++ b/evaluation-cases/test-case-microsecond-date-flag.json @@ -1,39 +1,41 @@ -[ - { - "attributes": {}, - "defaultValue": "unknown", - "flag": "microsecond-date-test", - "result": { - "reason": "STATIC", - "value": "active" +{ + "cases": [ + { + "attributes": {}, + "defaultValue": "unknown", + "flag": "microsecond-date-test", + "result": { + "reason": "STATIC", + "value": "active" + }, + "targetingKey": "alice", + "variationType": "STRING" }, - "targetingKey": "alice", - "variationType": "STRING" - }, - { - "attributes": { - "country": "US" + { + "attributes": { + "country": "US" + }, + "defaultValue": "unknown", + "flag": "microsecond-date-test", + "result": { + "reason": "STATIC", + "value": "active" + }, + "targetingKey": "bob", + "variationType": "STRING" }, - "defaultValue": "unknown", - "flag": "microsecond-date-test", - "result": { - "reason": "STATIC", - "value": "active" - }, - "targetingKey": "bob", - "variationType": "STRING" - }, - { - "attributes": { - "version": "1.0.0" - }, - "defaultValue": "unknown", - "flag": "microsecond-date-test", - "result": { - "reason": "STATIC", - "value": "active" - }, - "targetingKey": "charlie", - "variationType": "STRING" - } -] + { + "attributes": { + "version": "1.0.0" + }, + "defaultValue": "unknown", + "flag": "microsecond-date-test", + "result": { + "reason": "STATIC", + "value": "active" + }, + "targetingKey": "charlie", + "variationType": "STRING" + } + ] +} diff --git a/evaluation-cases/test-case-new-user-onboarding-flag.json b/evaluation-cases/test-case-new-user-onboarding-flag.json index bb08523..9a1fdf5 100644 --- a/evaluation-cases/test-case-new-user-onboarding-flag.json +++ b/evaluation-cases/test-case-new-user-onboarding-flag.json @@ -1,344 +1,346 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "green" - }, - "targetingKey": "alice", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "DEFAULT", - "value": "default" - }, - "targetingKey": "bob", - "variationType": "STRING" - }, - { - "attributes": { - "age": 50 - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "DEFAULT", - "value": "default" - }, - "targetingKey": "charlie", - "variationType": "STRING" - }, - { - "attributes": { - "age": 25, - "country": "Mexico", - "email": "test@test.com" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "blue" - }, - "targetingKey": "debra", - "variationType": "STRING" - }, - { - "attributes": { - "age": 25, - "country": "Mexico", - "email": "test@test.com" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "purple" - }, - "targetingKey": "zach", - "variationType": "STRING" - }, - { - "attributes": { - "age": 25, - "country": "Mexico", - "email": "test@test.com", - "id": "override-id" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "blue" - }, - "targetingKey": "zach", - "variationType": "STRING" - }, - { - "attributes": { - "age": 25, - "country": "Mexico", - "email": "test@test.com" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "DEFAULT", - "value": "default" - }, - "targetingKey": "Zach", - "variationType": "STRING" - }, - { - "attributes": {}, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "DEFAULT", - "value": "default" - }, - "targetingKey": "1", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Mexico" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "blue" - }, - "targetingKey": "2", - "variationType": "STRING" - }, - { - "attributes": { - "age": 33, - "country": "UK" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "control" - }, - "targetingKey": "3", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Germany" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "red" - }, - "targetingKey": "4", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Germany" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "yellow" - }, - "targetingKey": "5", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Germany" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "yellow" - }, - "targetingKey": "6", - "variationType": "STRING" - }, - { - "attributes": { - "country": "US" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "blue" - }, - "targetingKey": "7", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Italy" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "red" - }, - "targetingKey": "8", - "variationType": "STRING" - }, - { - "attributes": { - "email": "email@email.com" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "DEFAULT", - "value": "default" - }, - "targetingKey": "9", - "variationType": "STRING" - }, - { - "attributes": {}, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "DEFAULT", - "value": "default" - }, - "targetingKey": "10", - "variationType": "STRING" - }, - { - "attributes": {}, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "DEFAULT", - "value": "default" - }, - "targetingKey": "11", - "variationType": "STRING" - }, - { - "attributes": { - "country": "US" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "blue" - }, - "targetingKey": "12", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Canada" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "blue" - }, - "targetingKey": "13", - "variationType": "STRING" - }, - { - "attributes": {}, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "DEFAULT", - "value": "default" - }, - "targetingKey": "14", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Denmark" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "yellow" - }, - "targetingKey": "15", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Norway" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "control" - }, - "targetingKey": "16", - "variationType": "STRING" - }, - { - "attributes": { - "country": "UK" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "control" - }, - "targetingKey": "17", - "variationType": "STRING" - }, - { - "attributes": { - "country": "UK" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "DEFAULT", - "value": "default" - }, - "targetingKey": "18", - "variationType": "STRING" - }, - { - "attributes": { - "country": "UK" - }, - "defaultValue": "default", - "flag": "new-user-onboarding", - "result": { - "reason": "TARGETING_MATCH", - "value": "red" - }, - "targetingKey": "19", - "variationType": "STRING" - } -] +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "green" + }, + "targetingKey": "alice", + "variationType": "STRING" + }, + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "DEFAULT", + "value": "default" + }, + "targetingKey": "bob", + "variationType": "STRING" + }, + { + "attributes": { + "age": 50 + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "DEFAULT", + "value": "default" + }, + "targetingKey": "charlie", + "variationType": "STRING" + }, + { + "attributes": { + "age": 25, + "country": "Mexico", + "email": "test@test.com" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "blue" + }, + "targetingKey": "debra", + "variationType": "STRING" + }, + { + "attributes": { + "age": 25, + "country": "Mexico", + "email": "test@test.com" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "purple" + }, + "targetingKey": "zach", + "variationType": "STRING" + }, + { + "attributes": { + "age": 25, + "country": "Mexico", + "email": "test@test.com", + "id": "override-id" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "blue" + }, + "targetingKey": "zach", + "variationType": "STRING" + }, + { + "attributes": { + "age": 25, + "country": "Mexico", + "email": "test@test.com" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "DEFAULT", + "value": "default" + }, + "targetingKey": "Zach", + "variationType": "STRING" + }, + { + "attributes": {}, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "DEFAULT", + "value": "default" + }, + "targetingKey": "1", + "variationType": "STRING" + }, + { + "attributes": { + "country": "Mexico" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "blue" + }, + "targetingKey": "2", + "variationType": "STRING" + }, + { + "attributes": { + "age": 33, + "country": "UK" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "control" + }, + "targetingKey": "3", + "variationType": "STRING" + }, + { + "attributes": { + "country": "Germany" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "red" + }, + "targetingKey": "4", + "variationType": "STRING" + }, + { + "attributes": { + "country": "Germany" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "yellow" + }, + "targetingKey": "5", + "variationType": "STRING" + }, + { + "attributes": { + "country": "Germany" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "yellow" + }, + "targetingKey": "6", + "variationType": "STRING" + }, + { + "attributes": { + "country": "US" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "blue" + }, + "targetingKey": "7", + "variationType": "STRING" + }, + { + "attributes": { + "country": "Italy" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "red" + }, + "targetingKey": "8", + "variationType": "STRING" + }, + { + "attributes": { + "email": "email@email.com" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "DEFAULT", + "value": "default" + }, + "targetingKey": "9", + "variationType": "STRING" + }, + { + "attributes": {}, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "DEFAULT", + "value": "default" + }, + "targetingKey": "10", + "variationType": "STRING" + }, + { + "attributes": {}, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "DEFAULT", + "value": "default" + }, + "targetingKey": "11", + "variationType": "STRING" + }, + { + "attributes": { + "country": "US" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "blue" + }, + "targetingKey": "12", + "variationType": "STRING" + }, + { + "attributes": { + "country": "Canada" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "blue" + }, + "targetingKey": "13", + "variationType": "STRING" + }, + { + "attributes": {}, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "DEFAULT", + "value": "default" + }, + "targetingKey": "14", + "variationType": "STRING" + }, + { + "attributes": { + "country": "Denmark" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "yellow" + }, + "targetingKey": "15", + "variationType": "STRING" + }, + { + "attributes": { + "country": "Norway" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "control" + }, + "targetingKey": "16", + "variationType": "STRING" + }, + { + "attributes": { + "country": "UK" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "control" + }, + "targetingKey": "17", + "variationType": "STRING" + }, + { + "attributes": { + "country": "UK" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "DEFAULT", + "value": "default" + }, + "targetingKey": "18", + "variationType": "STRING" + }, + { + "attributes": { + "country": "UK" + }, + "defaultValue": "default", + "flag": "new-user-onboarding", + "result": { + "reason": "TARGETING_MATCH", + "value": "red" + }, + "targetingKey": "19", + "variationType": "STRING" + } + ] +} diff --git a/evaluation-cases/test-case-no-allocations-flag.json b/evaluation-cases/test-case-no-allocations-flag.json index 7d985b8..499a803 100644 --- a/evaluation-cases/test-case-no-allocations-flag.json +++ b/evaluation-cases/test-case-no-allocations-flag.json @@ -1,55 +1,57 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" - }, - "defaultValue": { - "hello": "world" - }, - "flag": "no_allocations_flag", - "result": { - "reason": "DEFAULT", - "value": { +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": { "hello": "world" - } - }, - "targetingKey": "alice", - "variationType": "JSON" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" - }, - "defaultValue": { - "hello": "world" - }, - "flag": "no_allocations_flag", - "result": { - "reason": "DEFAULT", - "value": { + }, + "flag": "no_allocations_flag", + "result": { + "reason": "DEFAULT", + "value": { + "hello": "world" + } + }, + "targetingKey": "alice", + "variationType": "JSON" + }, + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": { "hello": "world" - } - }, - "targetingKey": "bob", - "variationType": "JSON" - }, - { - "attributes": { - "age": 50 - }, - "defaultValue": { - "hello": "world" - }, - "flag": "no_allocations_flag", - "result": { - "reason": "DEFAULT", - "value": { + }, + "flag": "no_allocations_flag", + "result": { + "reason": "DEFAULT", + "value": { + "hello": "world" + } + }, + "targetingKey": "bob", + "variationType": "JSON" + }, + { + "attributes": { + "age": 50 + }, + "defaultValue": { "hello": "world" - } - }, - "targetingKey": "charlie", - "variationType": "JSON" - } -] + }, + "flag": "no_allocations_flag", + "result": { + "reason": "DEFAULT", + "value": { + "hello": "world" + } + }, + "targetingKey": "charlie", + "variationType": "JSON" + } + ] +} diff --git a/evaluation-cases/test-case-null-operator-flag.json b/evaluation-cases/test-case-null-operator-flag.json index 8063ff8..aae2dea 100644 --- a/evaluation-cases/test-case-null-operator-flag.json +++ b/evaluation-cases/test-case-null-operator-flag.json @@ -1,69 +1,71 @@ -[ - { - "attributes": { - "country": "US", - "size": 5 +{ + "cases": [ + { + "attributes": { + "country": "US", + "size": 5 + }, + "defaultValue": "default-null", + "flag": "null-operator-test", + "result": { + "reason": "TARGETING_MATCH", + "value": "old" + }, + "targetingKey": "alice", + "variationType": "STRING" }, - "defaultValue": "default-null", - "flag": "null-operator-test", - "result": { - "reason": "TARGETING_MATCH", - "value": "old" + { + "attributes": { + "country": "Canada", + "size": 10 + }, + "defaultValue": "default-null", + "flag": "null-operator-test", + "result": { + "reason": "TARGETING_MATCH", + "value": "new" + }, + "targetingKey": "bob", + "variationType": "STRING" }, - "targetingKey": "alice", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Canada", - "size": 10 + { + "attributes": { + "size": null + }, + "defaultValue": "default-null", + "flag": "null-operator-test", + "result": { + "reason": "TARGETING_MATCH", + "value": "old" + }, + "targetingKey": "charlie", + "variationType": "STRING" }, - "defaultValue": "default-null", - "flag": "null-operator-test", - "result": { - "reason": "TARGETING_MATCH", - "value": "new" + { + "attributes": { + "size": 26 + }, + "defaultValue": "default-null", + "flag": "null-operator-test", + "result": { + "reason": "TARGETING_MATCH", + "value": "new" + }, + "targetingKey": "david", + "variationType": "STRING" }, - "targetingKey": "bob", - "variationType": "STRING" - }, - { - "attributes": { - "size": null - }, - "defaultValue": "default-null", - "flag": "null-operator-test", - "result": { - "reason": "TARGETING_MATCH", - "value": "old" - }, - "targetingKey": "charlie", - "variationType": "STRING" - }, - { - "attributes": { - "size": 26 - }, - "defaultValue": "default-null", - "flag": "null-operator-test", - "result": { - "reason": "TARGETING_MATCH", - "value": "new" - }, - "targetingKey": "david", - "variationType": "STRING" - }, - { - "attributes": { - "country": "UK" - }, - "defaultValue": "default-null", - "flag": "null-operator-test", - "result": { - "reason": "TARGETING_MATCH", - "value": "old" - }, - "targetingKey": "elize", - "variationType": "STRING" - } -] + { + "attributes": { + "country": "UK" + }, + "defaultValue": "default-null", + "flag": "null-operator-test", + "result": { + "reason": "TARGETING_MATCH", + "value": "old" + }, + "targetingKey": "elize", + "variationType": "STRING" + } + ] +} diff --git a/evaluation-cases/test-case-null-targeting-key.json b/evaluation-cases/test-case-null-targeting-key.json index 6f93bcd..c1fa472 100644 --- a/evaluation-cases/test-case-null-targeting-key.json +++ b/evaluation-cases/test-case-null-targeting-key.json @@ -1,33 +1,37 @@ -[ - { - "flag": "empty-targeting-key-flag", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": null, - "attributes": {}, - "result": { - "value": "on-value" +{ + "cases": [ + { + "flag": "empty-targeting-key-flag", + "variationType": "STRING", + "defaultValue": "default", + "targetingKey": null, + "attributes": {}, + "result": { + "value": "on-value" + } + }, + { + "flag": "sharded-flag", + "variationType": "STRING", + "defaultValue": "default", + "targetingKey": null, + "attributes": {}, + "result": { + "value": "default" + } + }, + { + "flag": "rule-only-flag", + "variationType": "STRING", + "defaultValue": "default", + "targetingKey": null, + "attributes": { + "country": "US" + }, + "result": { + "value": "matched-value", + "variant": "match" + } } - }, - { - "flag": "sharded-flag", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": null, - "attributes": {}, - "result": { - "value": "default" - } - }, - { - "flag": "rule-only-flag", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": null, - "attributes": { "country": "US" }, - "result": { - "value": "matched-value", - "variant": "match" - } - } -] + ] +} diff --git a/evaluation-cases/test-case-numeric-flag.json b/evaluation-cases/test-case-numeric-flag.json index cc52dcd..88c018c 100644 --- a/evaluation-cases/test-case-numeric-flag.json +++ b/evaluation-cases/test-case-numeric-flag.json @@ -1,43 +1,45 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": 0, + "flag": "numeric_flag", + "result": { + "reason": "STATIC", + "value": 3.1415926 + }, + "targetingKey": "alice", + "variationType": "NUMERIC" }, - "defaultValue": 0, - "flag": "numeric_flag", - "result": { - "reason": "STATIC", - "value": 3.1415926 + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": 0, + "flag": "numeric_flag", + "result": { + "reason": "STATIC", + "value": 3.1415926 + }, + "targetingKey": "bob", + "variationType": "NUMERIC" }, - "targetingKey": "alice", - "variationType": "NUMERIC" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" - }, - "defaultValue": 0, - "flag": "numeric_flag", - "result": { - "reason": "STATIC", - "value": 3.1415926 - }, - "targetingKey": "bob", - "variationType": "NUMERIC" - }, - { - "attributes": { - "age": 50 - }, - "defaultValue": 0, - "flag": "numeric_flag", - "result": { - "reason": "STATIC", - "value": 3.1415926 - }, - "targetingKey": "charlie", - "variationType": "NUMERIC" - } -] + { + "attributes": { + "age": 50 + }, + "defaultValue": 0, + "flag": "numeric_flag", + "result": { + "reason": "STATIC", + "value": 3.1415926 + }, + "targetingKey": "charlie", + "variationType": "NUMERIC" + } + ] +} diff --git a/evaluation-cases/test-case-numeric-one-of.json b/evaluation-cases/test-case-numeric-one-of.json index bfa9573..353db2c 100644 --- a/evaluation-cases/test-case-numeric-one-of.json +++ b/evaluation-cases/test-case-numeric-one-of.json @@ -1,93 +1,95 @@ -[ - { - "attributes": { - "number": 1 +{ + "cases": [ + { + "attributes": { + "number": 1 + }, + "defaultValue": 0, + "flag": "numeric-one-of", + "result": { + "reason": "TARGETING_MATCH", + "value": 1 + }, + "targetingKey": "alice", + "variationType": "INTEGER" }, - "defaultValue": 0, - "flag": "numeric-one-of", - "result": { - "reason": "TARGETING_MATCH", - "value": 1 + { + "attributes": { + "number": 2 + }, + "defaultValue": 0, + "flag": "numeric-one-of", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "bob", + "variationType": "INTEGER" }, - "targetingKey": "alice", - "variationType": "INTEGER" - }, - { - "attributes": { - "number": 2 + { + "attributes": { + "number": 3 + }, + "defaultValue": 0, + "flag": "numeric-one-of", + "result": { + "reason": "TARGETING_MATCH", + "value": 3 + }, + "targetingKey": "charlie", + "variationType": "INTEGER" }, - "defaultValue": 0, - "flag": "numeric-one-of", - "result": { - "reason": "DEFAULT", - "value": 0 + { + "attributes": { + "number": 4 + }, + "defaultValue": 0, + "flag": "numeric-one-of", + "result": { + "reason": "TARGETING_MATCH", + "value": 3 + }, + "targetingKey": "derek", + "variationType": "INTEGER" }, - "targetingKey": "bob", - "variationType": "INTEGER" - }, - { - "attributes": { - "number": 3 + { + "attributes": { + "number": "1" + }, + "defaultValue": 0, + "flag": "numeric-one-of", + "result": { + "reason": "TARGETING_MATCH", + "value": 1 + }, + "targetingKey": "erica", + "variationType": "INTEGER" }, - "defaultValue": 0, - "flag": "numeric-one-of", - "result": { - "reason": "TARGETING_MATCH", - "value": 3 + { + "attributes": { + "number": 1 + }, + "defaultValue": 0, + "flag": "numeric-one-of", + "result": { + "reason": "TARGETING_MATCH", + "value": 1 + }, + "targetingKey": "frank", + "variationType": "INTEGER" }, - "targetingKey": "charlie", - "variationType": "INTEGER" - }, - { - "attributes": { - "number": 4 - }, - "defaultValue": 0, - "flag": "numeric-one-of", - "result": { - "reason": "TARGETING_MATCH", - "value": 3 - }, - "targetingKey": "derek", - "variationType": "INTEGER" - }, - { - "attributes": { - "number": "1" - }, - "defaultValue": 0, - "flag": "numeric-one-of", - "result": { - "reason": "TARGETING_MATCH", - "value": 1 - }, - "targetingKey": "erica", - "variationType": "INTEGER" - }, - { - "attributes": { - "number": 1 - }, - "defaultValue": 0, - "flag": "numeric-one-of", - "result": { - "reason": "TARGETING_MATCH", - "value": 1 - }, - "targetingKey": "frank", - "variationType": "INTEGER" - }, - { - "attributes": { - "number": 123456789 - }, - "defaultValue": 0, - "flag": "numeric-one-of", - "result": { - "reason": "TARGETING_MATCH", - "value": 2 - }, - "targetingKey": "george", - "variationType": "INTEGER" - } -] + { + "attributes": { + "number": 123456789 + }, + "defaultValue": 0, + "flag": "numeric-one-of", + "result": { + "reason": "TARGETING_MATCH", + "value": 2 + }, + "targetingKey": "george", + "variationType": "INTEGER" + } + ] +} diff --git a/evaluation-cases/test-case-of-7-empty-targeting-key.json b/evaluation-cases/test-case-of-7-empty-targeting-key.json index e99a207..721cd2a 100644 --- a/evaluation-cases/test-case-of-7-empty-targeting-key.json +++ b/evaluation-cases/test-case-of-7-empty-targeting-key.json @@ -1,13 +1,15 @@ -[ - { - "attributes": {}, - "defaultValue": "default", - "flag": "empty-targeting-key-flag", - "result": { - "reason": "STATIC", - "value": "on-value" - }, - "targetingKey": "", - "variationType": "STRING" - } -] +{ + "cases": [ + { + "attributes": {}, + "defaultValue": "default", + "flag": "empty-targeting-key-flag", + "result": { + "reason": "STATIC", + "value": "on-value" + }, + "targetingKey": "", + "variationType": "STRING" + } + ] +} diff --git a/evaluation-cases/test-case-regex-flag.json b/evaluation-cases/test-case-regex-flag.json index 253c4f7..d502dc2 100644 --- a/evaluation-cases/test-case-regex-flag.json +++ b/evaluation-cases/test-case-regex-flag.json @@ -1,57 +1,64 @@ -[ - { - "attributes": { - "email": "alice@example.com", - "version": "1.15.0" - }, - "defaultValue": "none", - "flag": "regex-flag", - "result": { - "reason": "TARGETING_MATCH", - "value": "partial-example" - }, - "targetingKey": "alice", - "variationType": "STRING" +{ + "xfail": { + "dotnet": "regex MATCHES operator not yet implemented" }, - { - "attributes": { - "email": "bob@test.com", - "version": "0.20.1" + "cases": [ + { + "attributes": { + "email": "alice@example.com", + "version": "1.15.0" + }, + "defaultValue": "none", + "flag": "regex-flag", + "result": { + "reason": "TARGETING_MATCH", + "value": "partial-example" + }, + "targetingKey": "alice", + "variationType": "STRING" }, - "defaultValue": "none", - "flag": "regex-flag", - "result": { - "reason": "TARGETING_MATCH", - "value": "test" - }, - "targetingKey": "bob", - "variationType": "STRING" - }, - { - "attributes": { - "version": "2.1.13" - }, - "defaultValue": "none", - "flag": "regex-flag", - "result": { - "reason": "DEFAULT", - "value": "none" - }, - "targetingKey": "charlie", - "variationType": "STRING" - }, - { - "attributes": { - "email": "derek@gmail.com", - "version": "2.1.13" + { + "attributes": { + "email": "bob@test.com", + "version": "0.20.1" + }, + "defaultValue": "none", + "flag": "regex-flag", + "result": { + "reason": "TARGETING_MATCH", + "value": "test" + }, + "targetingKey": "bob", + "variationType": "STRING" }, - "defaultValue": "none", - "flag": "regex-flag", - "result": { - "reason": "DEFAULT", - "value": "none" + { + "attributes": { + "version": "2.1.13" + }, + "defaultValue": "none", + "flag": "regex-flag", + "result": { + "reason": "DEFAULT", + "value": "none" + }, + "targetingKey": "charlie", + "variationType": "STRING", + "xfail": null }, - "targetingKey": "derek", - "variationType": "STRING" - } -] + { + "attributes": { + "email": "derek@gmail.com", + "version": "2.1.13" + }, + "defaultValue": "none", + "flag": "regex-flag", + "result": { + "reason": "DEFAULT", + "value": "none" + }, + "targetingKey": "derek", + "variationType": "STRING", + "xfail": null + } + ] +} diff --git a/evaluation-cases/test-case-start-and-end-date-flag.json b/evaluation-cases/test-case-start-and-end-date-flag.json index 0ab6dbd..da17cec 100644 --- a/evaluation-cases/test-case-start-and-end-date-flag.json +++ b/evaluation-cases/test-case-start-and-end-date-flag.json @@ -1,43 +1,45 @@ -[ - { - "attributes": { - "country": "US", - "version": "1.15.0" +{ + "cases": [ + { + "attributes": { + "country": "US", + "version": "1.15.0" + }, + "defaultValue": "unknown", + "flag": "start-and-end-date-test", + "result": { + "reason": "STATIC", + "value": "current" + }, + "targetingKey": "alice", + "variationType": "STRING" }, - "defaultValue": "unknown", - "flag": "start-and-end-date-test", - "result": { - "reason": "STATIC", - "value": "current" + { + "attributes": { + "country": "Canada", + "version": "0.20.1" + }, + "defaultValue": "unknown", + "flag": "start-and-end-date-test", + "result": { + "reason": "STATIC", + "value": "current" + }, + "targetingKey": "bob", + "variationType": "STRING" }, - "targetingKey": "alice", - "variationType": "STRING" - }, - { - "attributes": { - "country": "Canada", - "version": "0.20.1" - }, - "defaultValue": "unknown", - "flag": "start-and-end-date-test", - "result": { - "reason": "STATIC", - "value": "current" - }, - "targetingKey": "bob", - "variationType": "STRING" - }, - { - "attributes": { - "version": "2.1.13" - }, - "defaultValue": "unknown", - "flag": "start-and-end-date-test", - "result": { - "reason": "STATIC", - "value": "current" - }, - "targetingKey": "charlie", - "variationType": "STRING" - } -] + { + "attributes": { + "version": "2.1.13" + }, + "defaultValue": "unknown", + "flag": "start-and-end-date-test", + "result": { + "reason": "STATIC", + "value": "current" + }, + "targetingKey": "charlie", + "variationType": "STRING" + } + ] +} diff --git a/evaluation-cases/test-flag-that-does-not-exist.json b/evaluation-cases/test-flag-that-does-not-exist.json index 453beb7..7f4c751 100644 --- a/evaluation-cases/test-flag-that-does-not-exist.json +++ b/evaluation-cases/test-flag-that-does-not-exist.json @@ -1,43 +1,45 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": 0, + "flag": "flag-that-does-not-exist", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "alice", + "variationType": "NUMERIC" }, - "defaultValue": 0, - "flag": "flag-that-does-not-exist", - "result": { - "reason": "DEFAULT", - "value": 0 + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": 0, + "flag": "flag-that-does-not-exist", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "bob", + "variationType": "NUMERIC" }, - "targetingKey": "alice", - "variationType": "NUMERIC" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" - }, - "defaultValue": 0, - "flag": "flag-that-does-not-exist", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "bob", - "variationType": "NUMERIC" - }, - { - "attributes": { - "age": 50 - }, - "defaultValue": 0, - "flag": "flag-that-does-not-exist", - "result": { - "reason": "DEFAULT", - "value": 0 - }, - "targetingKey": "charlie", - "variationType": "NUMERIC" - } -] + { + "attributes": { + "age": 50 + }, + "defaultValue": 0, + "flag": "flag-that-does-not-exist", + "result": { + "reason": "DEFAULT", + "value": 0 + }, + "targetingKey": "charlie", + "variationType": "NUMERIC" + } + ] +} diff --git a/evaluation-cases/test-json-config-flag.json b/evaluation-cases/test-json-config-flag.json index 45a9c2e..8074dbd 100644 --- a/evaluation-cases/test-json-config-flag.json +++ b/evaluation-cases/test-json-config-flag.json @@ -1,76 +1,78 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": { + "foo": "bar" + }, + "flag": "json-config-flag", + "result": { + "reason": "SPLIT", + "value": { + "float": 1.0, + "integer": 1, + "string": "one" + } + }, + "targetingKey": "alice", + "variationType": "JSON" }, - "defaultValue": { - "foo": "bar" + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": { + "foo": "bar" + }, + "flag": "json-config-flag", + "result": { + "reason": "SPLIT", + "value": { + "float": 2.0, + "integer": 2, + "string": "two" + } + }, + "targetingKey": "bob", + "variationType": "JSON" }, - "flag": "json-config-flag", - "result": { - "reason": "SPLIT", - "value": { - "float": 1.0, - "integer": 1, - "string": "one" - } + { + "attributes": { + "age": 50 + }, + "defaultValue": { + "foo": "bar" + }, + "flag": "json-config-flag", + "result": { + "reason": "SPLIT", + "value": { + "float": 2.0, + "integer": 2, + "string": "two" + } + }, + "targetingKey": "charlie", + "variationType": "JSON" }, - "targetingKey": "alice", - "variationType": "JSON" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" - }, - "defaultValue": { - "foo": "bar" - }, - "flag": "json-config-flag", - "result": { - "reason": "SPLIT", - "value": { - "float": 2.0, - "integer": 2, - "string": "two" - } - }, - "targetingKey": "bob", - "variationType": "JSON" - }, - { - "attributes": { - "age": 50 - }, - "defaultValue": { - "foo": "bar" - }, - "flag": "json-config-flag", - "result": { - "reason": "SPLIT", - "value": { - "float": 2.0, - "integer": 2, - "string": "two" - } - }, - "targetingKey": "charlie", - "variationType": "JSON" - }, - { - "attributes": { - "Force Empty": true - }, - "defaultValue": { - "foo": "bar" - }, - "flag": "json-config-flag", - "result": { - "reason": "TARGETING_MATCH", - "value": {} - }, - "targetingKey": "diana", - "variationType": "JSON" - } -] + { + "attributes": { + "Force Empty": true + }, + "defaultValue": { + "foo": "bar" + }, + "flag": "json-config-flag", + "result": { + "reason": "TARGETING_MATCH", + "value": {} + }, + "targetingKey": "diana", + "variationType": "JSON" + } + ] +} diff --git a/evaluation-cases/test-no-allocations-flag.json b/evaluation-cases/test-no-allocations-flag.json index 2b03b9a..154f5e1 100644 --- a/evaluation-cases/test-no-allocations-flag.json +++ b/evaluation-cases/test-no-allocations-flag.json @@ -1,55 +1,57 @@ -[ - { - "attributes": { - "country": "US", - "email": "alice@mycompany.com" - }, - "defaultValue": { - "message": "Hello, world!" - }, - "flag": "no_allocations_flag", - "result": { - "reason": "DEFAULT", - "value": { +{ + "cases": [ + { + "attributes": { + "country": "US", + "email": "alice@mycompany.com" + }, + "defaultValue": { "message": "Hello, world!" - } - }, - "targetingKey": "alice", - "variationType": "JSON" - }, - { - "attributes": { - "country": "Canada", - "email": "bob@example.com" - }, - "defaultValue": { - "message": "Hello, world!" - }, - "flag": "no_allocations_flag", - "result": { - "reason": "DEFAULT", - "value": { + }, + "flag": "no_allocations_flag", + "result": { + "reason": "DEFAULT", + "value": { + "message": "Hello, world!" + } + }, + "targetingKey": "alice", + "variationType": "JSON" + }, + { + "attributes": { + "country": "Canada", + "email": "bob@example.com" + }, + "defaultValue": { "message": "Hello, world!" - } - }, - "targetingKey": "bob", - "variationType": "JSON" - }, - { - "attributes": { - "age": 50 - }, - "defaultValue": { - "message": "Hello, world!" - }, - "flag": "no_allocations_flag", - "result": { - "reason": "DEFAULT", - "value": { + }, + "flag": "no_allocations_flag", + "result": { + "reason": "DEFAULT", + "value": { + "message": "Hello, world!" + } + }, + "targetingKey": "bob", + "variationType": "JSON" + }, + { + "attributes": { + "age": 50 + }, + "defaultValue": { "message": "Hello, world!" - } - }, - "targetingKey": "charlie", - "variationType": "JSON" - } -] + }, + "flag": "no_allocations_flag", + "result": { + "reason": "DEFAULT", + "value": { + "message": "Hello, world!" + } + }, + "targetingKey": "charlie", + "variationType": "JSON" + } + ] +} diff --git a/evaluation-cases/test-special-characters.json b/evaluation-cases/test-special-characters.json index 1ed7795..b66d749 100644 --- a/evaluation-cases/test-special-characters.json +++ b/evaluation-cases/test-special-characters.json @@ -1,58 +1,60 @@ -[ - { - "attributes": {}, - "defaultValue": {}, - "flag": "special-characters", - "result": { - "reason": "SPLIT", - "value": { - "a": "kümmert", - "b": "schön" - } +{ + "cases": [ + { + "attributes": {}, + "defaultValue": {}, + "flag": "special-characters", + "result": { + "reason": "SPLIT", + "value": { + "a": "kümmert", + "b": "schön" + } + }, + "targetingKey": "ash", + "variationType": "JSON" }, - "targetingKey": "ash", - "variationType": "JSON" - }, - { - "attributes": {}, - "defaultValue": {}, - "flag": "special-characters", - "result": { - "reason": "SPLIT", - "value": { - "a": "піклуватися", - "b": "любов" - } + { + "attributes": {}, + "defaultValue": {}, + "flag": "special-characters", + "result": { + "reason": "SPLIT", + "value": { + "a": "піклуватися", + "b": "любов" + } + }, + "targetingKey": "ben", + "variationType": "JSON" }, - "targetingKey": "ben", - "variationType": "JSON" - }, - { - "attributes": {}, - "defaultValue": {}, - "flag": "special-characters", - "result": { - "reason": "SPLIT", - "value": { - "a": "照顾", - "b": "漂亮" - } + { + "attributes": {}, + "defaultValue": {}, + "flag": "special-characters", + "result": { + "reason": "SPLIT", + "value": { + "a": "照顾", + "b": "漂亮" + } + }, + "targetingKey": "cameron", + "variationType": "JSON" }, - "targetingKey": "cameron", - "variationType": "JSON" - }, - { - "attributes": {}, - "defaultValue": {}, - "flag": "special-characters", - "result": { - "reason": "SPLIT", - "value": { - "a": "🤗", - "b": "🌸" - } - }, - "targetingKey": "darryl", - "variationType": "JSON" - } -] + { + "attributes": {}, + "defaultValue": {}, + "flag": "special-characters", + "result": { + "reason": "SPLIT", + "value": { + "a": "🤗", + "b": "🌸" + } + }, + "targetingKey": "darryl", + "variationType": "JSON" + } + ] +} diff --git a/evaluation-cases/test-string-with-special-characters.json b/evaluation-cases/test-string-with-special-characters.json index 32397a4..d6b1417 100644 --- a/evaluation-cases/test-string-with-special-characters.json +++ b/evaluation-cases/test-string-with-special-characters.json @@ -1,860 +1,862 @@ -[ - { - "attributes": { - "string_with_spaces": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": " a b c d e f " - }, - "targetingKey": "string_with_spaces", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_space": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": " " - }, - "targetingKey": "string_with_only_one_space", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_spaces": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": " " - }, - "targetingKey": "string_with_only_multiple_spaces", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_dots": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ".a.b.c.d.e.f." - }, - "targetingKey": "string_with_dots", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_dot": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "." - }, - "targetingKey": "string_with_only_one_dot", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_dots": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "......." - }, - "targetingKey": "string_with_only_multiple_dots", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_comas": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ",a,b,c,d,e,f," - }, - "targetingKey": "string_with_comas", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_coma": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "," - }, - "targetingKey": "string_with_only_one_coma", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_comas": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ",,,,,,," - }, - "targetingKey": "string_with_only_multiple_comas", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_colons": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ":a:b:c:d:e:f:" - }, - "targetingKey": "string_with_colons", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_colon": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ":" - }, - "targetingKey": "string_with_only_one_colon", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_colons": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ":::::::" - }, - "targetingKey": "string_with_only_multiple_colons", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_semicolons": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ";a;b;c;d;e;f;" - }, - "targetingKey": "string_with_semicolons", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_semicolon": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ";" - }, - "targetingKey": "string_with_only_one_semicolon", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_semicolons": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ";;;;;;;" - }, - "targetingKey": "string_with_only_multiple_semicolons", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_slashes": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "/a/b/c/d/e/f/" - }, - "targetingKey": "string_with_slashes", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_slash": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "/" - }, - "targetingKey": "string_with_only_one_slash", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_slashes": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "///////" - }, - "targetingKey": "string_with_only_multiple_slashes", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_dashes": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "-a-b-c-d-e-f-" - }, - "targetingKey": "string_with_dashes", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_dash": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "-" - }, - "targetingKey": "string_with_only_one_dash", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_dashes": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "-------" - }, - "targetingKey": "string_with_only_multiple_dashes", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_underscores": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "_a_b_c_d_e_f_" - }, - "targetingKey": "string_with_underscores", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_underscore": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "_" - }, - "targetingKey": "string_with_only_one_underscore", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_underscores": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "_______" - }, - "targetingKey": "string_with_only_multiple_underscores", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_plus_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "+a+b+c+d+e+f+" - }, - "targetingKey": "string_with_plus_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_plus_sign": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "+" - }, - "targetingKey": "string_with_only_one_plus_sign", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_plus_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "+++++++" - }, - "targetingKey": "string_with_only_multiple_plus_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_equal_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "=a=b=c=d=e=f=" - }, - "targetingKey": "string_with_equal_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_equal_sign": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "=" - }, - "targetingKey": "string_with_only_one_equal_sign", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_equal_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "=======" - }, - "targetingKey": "string_with_only_multiple_equal_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_dollar_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "$a$b$c$d$e$f$" - }, - "targetingKey": "string_with_dollar_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_dollar_sign": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "$" - }, - "targetingKey": "string_with_only_one_dollar_sign", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_dollar_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "$$$$$$$" - }, - "targetingKey": "string_with_only_multiple_dollar_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_at_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "@a@b@c@d@e@f@" - }, - "targetingKey": "string_with_at_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_at_sign": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "@" - }, - "targetingKey": "string_with_only_one_at_sign", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_at_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "@@@@@@@" - }, - "targetingKey": "string_with_only_multiple_at_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_amp_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "\u0026a\u0026b\u0026c\u0026d\u0026e\u0026f\u0026" - }, - "targetingKey": "string_with_amp_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_amp_sign": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "\u0026" - }, - "targetingKey": "string_with_only_one_amp_sign", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_amp_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "\u0026\u0026\u0026\u0026\u0026\u0026\u0026" - }, - "targetingKey": "string_with_only_multiple_amp_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_hash_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "#a#b#c#d#e#f#" - }, - "targetingKey": "string_with_hash_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_hash_sign": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "#" - }, - "targetingKey": "string_with_only_one_hash_sign", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_hash_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "#######" - }, - "targetingKey": "string_with_only_multiple_hash_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_percentage_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "%a%b%c%d%e%f%" - }, - "targetingKey": "string_with_percentage_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_percentage_sign": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "%" - }, - "targetingKey": "string_with_only_one_percentage_sign", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_percentage_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "%%%%%%%" - }, - "targetingKey": "string_with_only_multiple_percentage_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_tilde_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "~a~b~c~d~e~f~" - }, - "targetingKey": "string_with_tilde_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_tilde_sign": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "~" - }, - "targetingKey": "string_with_only_one_tilde_sign", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_tilde_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "~~~~~~~" - }, - "targetingKey": "string_with_only_multiple_tilde_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_asterix_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "*a*b*c*d*e*f*" - }, - "targetingKey": "string_with_asterix_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_asterix_sign": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "*" - }, - "targetingKey": "string_with_only_one_asterix_sign", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_asterix_signs": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "*******" - }, - "targetingKey": "string_with_only_multiple_asterix_signs", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_single_quotes": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "'a'b'c'd'e'f'" - }, - "targetingKey": "string_with_single_quotes", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_single_quote": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "'" - }, - "targetingKey": "string_with_only_one_single_quote", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_single_quotes": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "'''''''" - }, - "targetingKey": "string_with_only_multiple_single_quotes", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_question_marks": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "?a?b?c?d?e?f?" - }, - "targetingKey": "string_with_question_marks", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_question_mark": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "?" - }, - "targetingKey": "string_with_only_one_question_mark", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_question_marks": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "???????" - }, - "targetingKey": "string_with_only_multiple_question_marks", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_exclamation_marks": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "!a!b!c!d!e!f!" - }, - "targetingKey": "string_with_exclamation_marks", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_exclamation_mark": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "!" - }, - "targetingKey": "string_with_only_one_exclamation_mark", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_exclamation_marks": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "!!!!!!!" - }, - "targetingKey": "string_with_only_multiple_exclamation_marks", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_opening_parentheses": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "(a(b(c(d(e(f(" - }, - "targetingKey": "string_with_opening_parentheses", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_opening_parenthese": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "(" - }, - "targetingKey": "string_with_only_one_opening_parenthese", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_opening_parentheses": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": "(((((((" - }, - "targetingKey": "string_with_only_multiple_opening_parentheses", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_closing_parentheses": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ")a)b)c)d)e)f)" - }, - "targetingKey": "string_with_closing_parentheses", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_one_closing_parenthese": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ")" - }, - "targetingKey": "string_with_only_one_closing_parenthese", - "variationType": "STRING" - }, - { - "attributes": { - "string_with_only_multiple_closing_parentheses": true - }, - "defaultValue": "default_value", - "flag": "string_flag_with_special_characters", - "result": { - "reason": "TARGETING_MATCH", - "value": ")))))))" - }, - "targetingKey": "string_with_only_multiple_closing_parentheses", - "variationType": "STRING" - } -] +{ + "cases": [ + { + "attributes": { + "string_with_spaces": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": " a b c d e f " + }, + "targetingKey": "string_with_spaces", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_space": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": " " + }, + "targetingKey": "string_with_only_one_space", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_spaces": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": " " + }, + "targetingKey": "string_with_only_multiple_spaces", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_dots": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ".a.b.c.d.e.f." + }, + "targetingKey": "string_with_dots", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_dot": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "." + }, + "targetingKey": "string_with_only_one_dot", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_dots": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "......." + }, + "targetingKey": "string_with_only_multiple_dots", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_comas": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ",a,b,c,d,e,f," + }, + "targetingKey": "string_with_comas", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_coma": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "," + }, + "targetingKey": "string_with_only_one_coma", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_comas": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ",,,,,,," + }, + "targetingKey": "string_with_only_multiple_comas", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_colons": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ":a:b:c:d:e:f:" + }, + "targetingKey": "string_with_colons", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_colon": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ":" + }, + "targetingKey": "string_with_only_one_colon", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_colons": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ":::::::" + }, + "targetingKey": "string_with_only_multiple_colons", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_semicolons": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ";a;b;c;d;e;f;" + }, + "targetingKey": "string_with_semicolons", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_semicolon": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ";" + }, + "targetingKey": "string_with_only_one_semicolon", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_semicolons": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ";;;;;;;" + }, + "targetingKey": "string_with_only_multiple_semicolons", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_slashes": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "/a/b/c/d/e/f/" + }, + "targetingKey": "string_with_slashes", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_slash": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "/" + }, + "targetingKey": "string_with_only_one_slash", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_slashes": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "///////" + }, + "targetingKey": "string_with_only_multiple_slashes", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_dashes": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "-a-b-c-d-e-f-" + }, + "targetingKey": "string_with_dashes", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_dash": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "-" + }, + "targetingKey": "string_with_only_one_dash", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_dashes": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "-------" + }, + "targetingKey": "string_with_only_multiple_dashes", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_underscores": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "_a_b_c_d_e_f_" + }, + "targetingKey": "string_with_underscores", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_underscore": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "_" + }, + "targetingKey": "string_with_only_one_underscore", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_underscores": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "_______" + }, + "targetingKey": "string_with_only_multiple_underscores", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_plus_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "+a+b+c+d+e+f+" + }, + "targetingKey": "string_with_plus_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_plus_sign": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "+" + }, + "targetingKey": "string_with_only_one_plus_sign", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_plus_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "+++++++" + }, + "targetingKey": "string_with_only_multiple_plus_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_equal_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "=a=b=c=d=e=f=" + }, + "targetingKey": "string_with_equal_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_equal_sign": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "=" + }, + "targetingKey": "string_with_only_one_equal_sign", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_equal_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "=======" + }, + "targetingKey": "string_with_only_multiple_equal_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_dollar_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "$a$b$c$d$e$f$" + }, + "targetingKey": "string_with_dollar_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_dollar_sign": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "$" + }, + "targetingKey": "string_with_only_one_dollar_sign", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_dollar_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "$$$$$$$" + }, + "targetingKey": "string_with_only_multiple_dollar_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_at_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "@a@b@c@d@e@f@" + }, + "targetingKey": "string_with_at_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_at_sign": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "@" + }, + "targetingKey": "string_with_only_one_at_sign", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_at_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "@@@@@@@" + }, + "targetingKey": "string_with_only_multiple_at_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_amp_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "&a&b&c&d&e&f&" + }, + "targetingKey": "string_with_amp_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_amp_sign": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "&" + }, + "targetingKey": "string_with_only_one_amp_sign", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_amp_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "&&&&&&&" + }, + "targetingKey": "string_with_only_multiple_amp_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_hash_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "#a#b#c#d#e#f#" + }, + "targetingKey": "string_with_hash_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_hash_sign": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "#" + }, + "targetingKey": "string_with_only_one_hash_sign", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_hash_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "#######" + }, + "targetingKey": "string_with_only_multiple_hash_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_percentage_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "%a%b%c%d%e%f%" + }, + "targetingKey": "string_with_percentage_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_percentage_sign": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "%" + }, + "targetingKey": "string_with_only_one_percentage_sign", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_percentage_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "%%%%%%%" + }, + "targetingKey": "string_with_only_multiple_percentage_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_tilde_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "~a~b~c~d~e~f~" + }, + "targetingKey": "string_with_tilde_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_tilde_sign": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "~" + }, + "targetingKey": "string_with_only_one_tilde_sign", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_tilde_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "~~~~~~~" + }, + "targetingKey": "string_with_only_multiple_tilde_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_asterix_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "*a*b*c*d*e*f*" + }, + "targetingKey": "string_with_asterix_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_asterix_sign": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "*" + }, + "targetingKey": "string_with_only_one_asterix_sign", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_asterix_signs": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "*******" + }, + "targetingKey": "string_with_only_multiple_asterix_signs", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_single_quotes": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "'a'b'c'd'e'f'" + }, + "targetingKey": "string_with_single_quotes", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_single_quote": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "'" + }, + "targetingKey": "string_with_only_one_single_quote", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_single_quotes": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "'''''''" + }, + "targetingKey": "string_with_only_multiple_single_quotes", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_question_marks": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "?a?b?c?d?e?f?" + }, + "targetingKey": "string_with_question_marks", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_question_mark": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "?" + }, + "targetingKey": "string_with_only_one_question_mark", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_question_marks": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "???????" + }, + "targetingKey": "string_with_only_multiple_question_marks", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_exclamation_marks": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "!a!b!c!d!e!f!" + }, + "targetingKey": "string_with_exclamation_marks", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_exclamation_mark": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "!" + }, + "targetingKey": "string_with_only_one_exclamation_mark", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_exclamation_marks": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "!!!!!!!" + }, + "targetingKey": "string_with_only_multiple_exclamation_marks", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_opening_parentheses": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "(a(b(c(d(e(f(" + }, + "targetingKey": "string_with_opening_parentheses", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_opening_parenthese": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "(" + }, + "targetingKey": "string_with_only_one_opening_parenthese", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_opening_parentheses": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": "(((((((" + }, + "targetingKey": "string_with_only_multiple_opening_parentheses", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_closing_parentheses": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ")a)b)c)d)e)f)" + }, + "targetingKey": "string_with_closing_parentheses", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_one_closing_parenthese": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ")" + }, + "targetingKey": "string_with_only_one_closing_parenthese", + "variationType": "STRING" + }, + { + "attributes": { + "string_with_only_multiple_closing_parentheses": true + }, + "defaultValue": "default_value", + "flag": "string_flag_with_special_characters", + "result": { + "reason": "TARGETING_MATCH", + "value": ")))))))" + }, + "targetingKey": "string_with_only_multiple_closing_parentheses", + "variationType": "STRING" + } + ] +}