From 99892b0531c9f5982d856fa4d77f7b52757126f0 Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Tue, 12 May 2026 12:33:13 -0400 Subject: [PATCH 1/8] Use canonical FFE fixtures --- .github/dependabot.yml | 6 + .gitmodules | 3 + datadog-ffe/benches/eval.rs | 4 +- datadog-ffe/ffe-system-test-data | 1 + .../src/rules_based/eval/eval_assignment.rs | 37 +- .../rules_based/ufc/compiled_flag_config.rs | 3 + datadog-ffe/tests/data/flags-v1.json | 3079 ----------------- .../test-case-boolean-one-of-matches.json | 240 -- .../test-case-comparator-operator-flag.json | 82 - .../data/tests/test-case-disabled-flag.json | 40 - .../data/tests/test-case-empty-flag.json | 40 - .../test-case-flag-with-empty-string.json | 36 - .../data/tests/test-case-integer-flag.json | 382 -- .../tests/test-case-kill-switch-flag.json | 434 --- .../test-case-new-user-onboarding-flag.json | 420 --- .../tests/test-case-no-allocations-flag.json | 52 - .../tests/test-case-null-operator-flag.json | 94 - .../tests/test-case-null-targeting-key.json | 40 - .../data/tests/test-case-numeric-flag.json | 58 - .../data/tests/test-case-numeric-one-of.json | 122 - .../data/tests/test-case-regex-flag.json | 65 - .../test-case-start-and-end-date-flag.json | 58 - .../tests/test-flag-that-does-not-exist.json | 40 - .../data/tests/test-json-config-flag.json | 96 - .../data/tests/test-no-allocations-flag.json | 52 - .../data/tests/test-special-characters.json | 78 - .../test-string-with-special-characters.json | 1190 ------- 27 files changed, 44 insertions(+), 6708 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .gitmodules create mode 160000 datadog-ffe/ffe-system-test-data delete mode 100644 datadog-ffe/tests/data/flags-v1.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-boolean-one-of-matches.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-comparator-operator-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-disabled-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-empty-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-flag-with-empty-string.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-integer-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-kill-switch-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-new-user-onboarding-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-no-allocations-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-null-operator-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-null-targeting-key.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-numeric-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-numeric-one-of.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-regex-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-case-start-and-end-date-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-flag-that-does-not-exist.json delete mode 100644 datadog-ffe/tests/data/tests/test-json-config-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-no-allocations-flag.json delete mode 100644 datadog-ffe/tests/data/tests/test-special-characters.json delete mode 100644 datadog-ffe/tests/data/tests/test-string-with-special-characters.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..fb0e272975 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "weekly" diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..c2e5b238b4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "datadog-ffe/ffe-system-test-data"] + path = datadog-ffe/ffe-system-test-data + url = https://github.com/DataDog/ffe-system-test-data.git diff --git a/datadog-ffe/benches/eval.rs b/datadog-ffe/benches/eval.rs index 53e727edca..2af6f432db 100644 --- a/datadog-ffe/benches/eval.rs +++ b/datadog-ffe/benches/eval.rs @@ -11,7 +11,7 @@ use datadog_ffe::rules_based::{ }; fn load_configuration_bytes() -> Vec { - fs::read("tests/data/flags-v1.json").expect("Failed to read flags-v1.json") + fs::read("ffe-system-test-data/ufc-config.json").expect("Failed to read ufc-config.json") } #[derive(Debug, Serialize, Deserialize)] @@ -33,7 +33,7 @@ struct TestResult { fn load_test_cases() -> Vec { let mut test_cases = Vec::new(); - if let Ok(entries) = fs::read_dir("tests/data/tests") { + if let Ok(entries) = fs::read_dir("ffe-system-test-data/evaluation-cases") { for entry in entries.flatten() { if let Some(path_str) = entry.path().to_str() { if path_str.ends_with(".json") { diff --git a/datadog-ffe/ffe-system-test-data b/datadog-ffe/ffe-system-test-data new file mode 160000 index 0000000000..4e2492b83e --- /dev/null +++ b/datadog-ffe/ffe-system-test-data @@ -0,0 +1 @@ +Subproject commit 4e2492b83e450e2d5746812e9e36649ff906f6c7 diff --git a/datadog-ffe/src/rules_based/eval/eval_assignment.rs b/datadog-ffe/src/rules_based/eval/eval_assignment.rs index d4cb726173..80646c9e10 100644 --- a/datadog-ffe/src/rules_based/eval/eval_assignment.rs +++ b/datadog-ffe/src/rules_based/eval/eval_assignment.rs @@ -149,9 +149,9 @@ impl Allocation { }; // Determine the reason for assignment - let reason = if !self.rules.is_empty() || self.start_at.is_some() || self.end_at.is_some() { + let reason = if !self.rules.is_empty() { AssignmentReason::TargetingMatch - } else if self.splits.len() == 1 && self.splits[0].shards.is_empty() { + } else if self.splits.len() == 1 && !self.splits[0].had_shards { AssignmentReason::Static } else { AssignmentReason::Split @@ -212,8 +212,8 @@ mod tests { use crate::rules_based::{ eval::get_assignment, - ufc::{AssignmentValue, UniversalFlagConfig}, - Attribute, Configuration, EvaluationContext, FlagType, Str, + ufc::{AssignmentReason, AssignmentValue, UniversalFlagConfig}, + Attribute, Configuration, EvaluationContext, EvaluationError, FlagType, Str, }; #[derive(Debug, Serialize, Deserialize)] @@ -230,6 +230,25 @@ mod tests { #[derive(Debug, Serialize, Deserialize)] struct TestResult { value: Arc, + reason: Str, + } + + fn reason_name( + result: &Result, + ) -> &'static str { + match result { + Ok(assignment) => match assignment.reason { + AssignmentReason::TargetingMatch => "TARGETING_MATCH", + AssignmentReason::Split => "SPLIT", + AssignmentReason::Static => "STATIC", + }, + Err(EvaluationError::FlagDisabled) => "DISABLED", + Err( + EvaluationError::DefaultAllocationNull + | EvaluationError::FlagUnrecognizedOrDisabled, + ) => "DEFAULT", + Err(_) => "ERROR", + } } #[test] @@ -237,13 +256,14 @@ mod tests { fn evaluation_sdk_test_data() { let _ = env_logger::builder().is_test(true).try_init(); - let config = - UniversalFlagConfig::from_json(std::fs::read("tests/data/flags-v1.json").unwrap()) - .unwrap(); + let config = UniversalFlagConfig::from_json( + std::fs::read("ffe-system-test-data/ufc-config.json").unwrap(), + ) + .unwrap(); let config = Configuration::from_server_response(config); let now = Utc::now(); - for entry in fs::read_dir("tests/data/tests/").unwrap() { + for entry in fs::read_dir("ffe-system-test-data/evaluation-cases/").unwrap() { let entry = entry.unwrap(); println!("Processing test file: {:?}", entry.path()); @@ -278,6 +298,7 @@ mod tests { .unwrap(); assert_eq!(result_assingment, &expected_assignment); + assert_eq!(reason_name(&result), test_case.result.reason.as_str()); println!("ok"); } } diff --git a/datadog-ffe/src/rules_based/ufc/compiled_flag_config.rs b/datadog-ffe/src/rules_based/ufc/compiled_flag_config.rs index dc10920cbc..f838f67291 100644 --- a/datadog-ffe/src/rules_based/ufc/compiled_flag_config.rs +++ b/datadog-ffe/src/rules_based/ufc/compiled_flag_config.rs @@ -51,6 +51,7 @@ pub(crate) struct Allocation { #[derive(Debug)] pub(crate) struct Split { pub shards: Vec, + pub had_shards: bool, pub variation_key: Str, pub value: AssignmentValue, pub serial_id: Option, @@ -150,6 +151,7 @@ fn compile_split( split: SplitWire, variation_values: &HashMap, ) -> Result { + let had_shards = !split.shards.is_empty(); let shards = split .shards .into_iter() @@ -167,6 +169,7 @@ fn compile_split( Ok(Split { shards, + had_shards, variation_key: split.variation_key, value: result, serial_id: split.serial_id, diff --git a/datadog-ffe/tests/data/flags-v1.json b/datadog-ffe/tests/data/flags-v1.json deleted file mode 100644 index 670715638e..0000000000 --- a/datadog-ffe/tests/data/flags-v1.json +++ /dev/null @@ -1,3079 +0,0 @@ -{ - "id": "1", - "createdAt": "2024-04-17T19:40:53.716Z", - "format": "SERVER", - "environment": { - "name": "Test" - }, - "flags": { - "empty_flag": { - "key": "empty_flag", - "enabled": true, - "variationType": "STRING", - "variations": {}, - "allocations": [] - }, - "disabled_flag": { - "key": "disabled_flag", - "enabled": false, - "variationType": "INTEGER", - "variations": {}, - "allocations": [] - }, - "no_allocations_flag": { - "key": "no_allocations_flag", - "enabled": true, - "variationType": "JSON", - "variations": { - "control": { - "key": "control", - "value": { - "variant": "control" - } - }, - "treatment": { - "key": "treatment", - "value": { - "variant": "treatment" - } - } - }, - "allocations": [] - }, - "numeric_flag": { - "key": "numeric_flag", - "enabled": true, - "variationType": "NUMERIC", - "variations": { - "e": { - "key": "e", - "value": 2.7182818 - }, - "pi": { - "key": "pi", - "value": 3.1415926 - } - }, - "allocations": [ - { - "key": "rollout", - "splits": [ - { - "variationKey": "pi", - "shards": [] - } - ], - "doLog": true - } - ] - }, - "regex-flag": { - "key": "regex-flag", - "enabled": true, - "variationType": "STRING", - "variations": { - "partial-example": { - "key": "partial-example", - "value": "partial-example" - }, - "test": { - "key": "test", - "value": "test" - } - }, - "allocations": [ - { - "key": "partial-example", - "rules": [ - { - "conditions": [ - { - "attribute": "email", - "operator": "MATCHES", - "value": "@example\\.com" - } - ] - } - ], - "splits": [ - { - "variationKey": "partial-example", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "test", - "rules": [ - { - "conditions": [ - { - "attribute": "email", - "operator": "MATCHES", - "value": ".*@test\\.com" - } - ] - } - ], - "splits": [ - { - "variationKey": "test", - "shards": [] - } - ], - "doLog": true - } - ] - }, - "numeric-one-of": { - "key": "numeric-one-of", - "enabled": true, - "variationType": "INTEGER", - "variations": { - "1": { - "key": "1", - "value": 1 - }, - "2": { - "key": "2", - "value": 2 - }, - "3": { - "key": "3", - "value": 3 - } - }, - "allocations": [ - { - "key": "1-for-1", - "rules": [ - { - "conditions": [ - { - "attribute": "number", - "operator": "ONE_OF", - "value": [ - "1" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "1", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "2-for-123456789", - "rules": [ - { - "conditions": [ - { - "attribute": "number", - "operator": "ONE_OF", - "value": [ - "123456789" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "2", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "3-for-not-2", - "rules": [ - { - "conditions": [ - { - "attribute": "number", - "operator": "NOT_ONE_OF", - "value": [ - "2" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "3", - "shards": [] - } - ], - "doLog": true - } - ] - }, - "boolean-one-of-matches": { - "key": "boolean-one-of-matches", - "enabled": true, - "variationType": "INTEGER", - "variations": { - "1": { - "key": "1", - "value": 1 - }, - "2": { - "key": "2", - "value": 2 - }, - "3": { - "key": "3", - "value": 3 - }, - "4": { - "key": "4", - "value": 4 - }, - "5": { - "key": "5", - "value": 5 - } - }, - "allocations": [ - { - "key": "1-for-one-of", - "rules": [ - { - "conditions": [ - { - "attribute": "one_of_flag", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "1", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "2-for-matches", - "rules": [ - { - "conditions": [ - { - "attribute": "matches_flag", - "operator": "MATCHES", - "value": "true" - } - ] - } - ], - "splits": [ - { - "variationKey": "2", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "3-for-not-one-of", - "rules": [ - { - "conditions": [ - { - "attribute": "not_one_of_flag", - "operator": "NOT_ONE_OF", - "value": [ - "false" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "3", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "4-for-not-matches", - "rules": [ - { - "conditions": [ - { - "attribute": "not_matches_flag", - "operator": "NOT_MATCHES", - "value": "false" - } - ] - } - ], - "splits": [ - { - "variationKey": "4", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "5-for-matches-null", - "rules": [ - { - "conditions": [ - { - "attribute": "null_flag", - "operator": "ONE_OF", - "value": [ - "null" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "5", - "shards": [] - } - ], - "doLog": true - } - ] - }, - "empty_string_flag": { - "key": "empty_string_flag", - "enabled": true, - "comment": "Testing the empty string as a variation value", - "variationType": "STRING", - "variations": { - "empty_string": { - "key": "empty_string", - "value": "" - }, - "non_empty": { - "key": "non_empty", - "value": "non_empty" - } - }, - "allocations": [ - { - "key": "allocation-empty", - "rules": [ - { - "conditions": [ - { - "attribute": "country", - "operator": "MATCHES", - "value": "US" - } - ] - } - ], - "splits": [ - { - "variationKey": "empty_string", - "shards": [ - { - "salt": "allocation-empty-shards", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - }, - { - "key": "allocation-test", - "rules": [], - "splits": [ - { - "variationKey": "non_empty", - "shards": [ - { - "salt": "allocation-empty-shards", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - } - ] - }, - "kill-switch": { - "key": "kill-switch", - "enabled": true, - "variationType": "BOOLEAN", - "variations": { - "on": { - "key": "on", - "value": true - }, - "off": { - "key": "off", - "value": false - } - }, - "allocations": [ - { - "key": "on-for-NA", - "rules": [ - { - "conditions": [ - { - "attribute": "country", - "operator": "ONE_OF", - "value": [ - "US", - "Canada", - "Mexico" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "on", - "shards": [ - { - "salt": "some-salt", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - }, - { - "key": "on-for-age-50+", - "rules": [ - { - "conditions": [ - { - "attribute": "age", - "operator": "GTE", - "value": 50 - } - ] - } - ], - "splits": [ - { - "variationKey": "on", - "shards": [ - { - "salt": "some-salt", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - }, - { - "key": "off-for-all", - "rules": [], - "splits": [ - { - "variationKey": "off", - "shards": [] - } - ], - "doLog": true - } - ] - }, - "comparator-operator-test": { - "key": "comparator-operator-test", - "enabled": true, - "variationType": "STRING", - "variations": { - "small": { - "key": "small", - "value": "small" - }, - "medium": { - "key": "medium", - "value": "medium" - }, - "large": { - "key": "large", - "value": "large" - } - }, - "allocations": [ - { - "key": "small-size", - "rules": [ - { - "conditions": [ - { - "attribute": "size", - "operator": "LT", - "value": 10 - } - ] - } - ], - "splits": [ - { - "variationKey": "small", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "medum-size", - "rules": [ - { - "conditions": [ - { - "attribute": "size", - "operator": "GTE", - "value": 10 - }, - { - "attribute": "size", - "operator": "LTE", - "value": 20 - } - ] - } - ], - "splits": [ - { - "variationKey": "medium", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "large-size", - "rules": [ - { - "conditions": [ - { - "attribute": "size", - "operator": "GT", - "value": 25 - } - ] - } - ], - "splits": [ - { - "variationKey": "large", - "shards": [] - } - ], - "doLog": true - } - ] - }, - "start-and-end-date-test": { - "key": "start-and-end-date-test", - "enabled": true, - "variationType": "STRING", - "variations": { - "old": { - "key": "old", - "value": "old" - }, - "current": { - "key": "current", - "value": "current" - }, - "new": { - "key": "new", - "value": "new" - } - }, - "allocations": [ - { - "key": "old-versions", - "splits": [ - { - "variationKey": "old", - "shards": [] - } - ], - "endAt": "2002-10-31T09:00:00.594Z", - "doLog": true - }, - { - "key": "future-versions", - "splits": [ - { - "variationKey": "new", - "shards": [] - } - ], - "startAt": "2052-10-31T09:00:00.594Z", - "doLog": true - }, - { - "key": "current-versions", - "splits": [ - { - "variationKey": "current", - "shards": [] - } - ], - "startAt": "2022-10-31T09:00:00.594Z", - "endAt": "2050-10-31T09:00:00.594Z", - "doLog": true - } - ] - }, - "null-operator-test": { - "key": "null-operator-test", - "enabled": true, - "variationType": "STRING", - "variations": { - "old": { - "key": "old", - "value": "old" - }, - "new": { - "key": "new", - "value": "new" - } - }, - "allocations": [ - { - "key": "null-operator", - "rules": [ - { - "conditions": [ - { - "attribute": "size", - "operator": "IS_NULL", - "value": true - } - ] - }, - { - "conditions": [ - { - "attribute": "size", - "operator": "LT", - "value": 10 - } - ] - } - ], - "splits": [ - { - "variationKey": "old", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "not-null-operator", - "rules": [ - { - "conditions": [ - { - "attribute": "size", - "operator": "IS_NULL", - "value": false - } - ] - } - ], - "splits": [ - { - "variationKey": "new", - "shards": [] - } - ], - "doLog": true - } - ] - }, - "new-user-onboarding": { - "key": "new-user-onboarding", - "enabled": true, - "variationType": "STRING", - "variations": { - "control": { - "key": "control", - "value": "control" - }, - "red": { - "key": "red", - "value": "red" - }, - "blue": { - "key": "blue", - "value": "blue" - }, - "green": { - "key": "green", - "value": "green" - }, - "yellow": { - "key": "yellow", - "value": "yellow" - }, - "purple": { - "key": "purple", - "value": "purple" - } - }, - "allocations": [ - { - "key": "id rule", - "rules": [ - { - "conditions": [ - { - "attribute": "id", - "operator": "MATCHES", - "value": "zach" - } - ] - } - ], - "splits": [ - { - "variationKey": "purple", - "shards": [] - } - ], - "doLog": false - }, - { - "key": "internal users", - "rules": [ - { - "conditions": [ - { - "attribute": "email", - "operator": "MATCHES", - "value": "@mycompany.com" - } - ] - } - ], - "splits": [ - { - "variationKey": "green", - "shards": [] - } - ], - "doLog": false - }, - { - "key": "experiment", - "rules": [ - { - "conditions": [ - { - "attribute": "country", - "operator": "NOT_ONE_OF", - "value": [ - "US", - "Canada", - "Mexico" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "control", - "shards": [ - { - "salt": "traffic-new-user-onboarding-experiment", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 6000 - } - ] - }, - { - "salt": "split-new-user-onboarding-experiment", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 5000 - } - ] - } - ] - }, - { - "variationKey": "red", - "shards": [ - { - "salt": "traffic-new-user-onboarding-experiment", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 6000 - } - ] - }, - { - "salt": "split-new-user-onboarding-experiment", - "totalShards": 10000, - "ranges": [ - { - "start": 5000, - "end": 8000 - } - ] - } - ] - }, - { - "variationKey": "yellow", - "shards": [ - { - "salt": "traffic-new-user-onboarding-experiment", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 6000 - } - ] - }, - { - "salt": "split-new-user-onboarding-experiment", - "totalShards": 10000, - "ranges": [ - { - "start": 8000, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - }, - { - "key": "rollout", - "rules": [ - { - "conditions": [ - { - "attribute": "country", - "operator": "ONE_OF", - "value": [ - "US", - "Canada", - "Mexico" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "blue", - "shards": [ - { - "salt": "split-new-user-onboarding-rollout", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 8000 - } - ] - } - ], - "extraLogging": { - "allocationvalue_type": "rollout", - "owner": "hippo" - } - } - ], - "doLog": true - } - ] - }, - "integer-flag": { - "key": "integer-flag", - "enabled": true, - "variationType": "INTEGER", - "variations": { - "one": { - "key": "one", - "value": 1 - }, - "two": { - "key": "two", - "value": 2 - }, - "three": { - "key": "three", - "value": 3 - } - }, - "allocations": [ - { - "key": "targeted allocation", - "rules": [ - { - "conditions": [ - { - "attribute": "country", - "operator": "ONE_OF", - "value": [ - "US", - "Canada", - "Mexico" - ] - } - ] - }, - { - "conditions": [ - { - "attribute": "email", - "operator": "MATCHES", - "value": ".*@example.com" - } - ] - } - ], - "splits": [ - { - "variationKey": "three", - "shards": [ - { - "salt": "full-range-salt", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - }, - { - "key": "50/50 split", - "rules": [], - "splits": [ - { - "variationKey": "one", - "shards": [ - { - "salt": "split-numeric-flag-some-allocation", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 5000 - } - ] - } - ] - }, - { - "variationKey": "two", - "shards": [ - { - "salt": "split-numeric-flag-some-allocation", - "totalShards": 10000, - "ranges": [ - { - "start": 5000, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - } - ] - }, - "json-config-flag": { - "key": "json-config-flag", - "enabled": true, - "variationType": "JSON", - "variations": { - "one": { - "key": "one", - "value": { - "integer": 1, - "string": "one", - "float": 1.0 - } - }, - "two": { - "key": "two", - "value": { - "integer": 2, - "string": "two", - "float": 2.0 - } - }, - "empty": { - "key": "empty", - "value": {} - } - }, - "allocations": [ - { - "key": "Optionally Force Empty", - "rules": [ - { - "conditions": [ - { - "attribute": "Force Empty", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "empty", - "shards": [ - { - "salt": "full-range-salt", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - }, - { - "key": "50/50 split", - "rules": [], - "splits": [ - { - "variationKey": "one", - "shards": [ - { - "salt": "traffic-json-flag", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - }, - { - "salt": "split-json-flag", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 5000 - } - ] - } - ] - }, - { - "variationKey": "two", - "shards": [ - { - "salt": "traffic-json-flag", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - }, - { - "salt": "split-json-flag", - "totalShards": 10000, - "ranges": [ - { - "start": 5000, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - } - ] - }, - "special-characters": { - "key": "special-characters", - "enabled": true, - "variationType": "JSON", - "variations": { - "de": { - "key": "de", - "value": { - "a": "kümmert", - "b": "schön" - } - }, - "ua": { - "key": "ua", - "value": { - "a": "піклуватися", - "b": "любов" - } - }, - "zh": { - "key": "zh", - "value": { - "a": "照顾", - "b": "漂亮" - } - }, - "emoji": { - "key": "emoji", - "value": { - "a": "🤗", - "b": "🌸" - } - } - }, - "allocations": [ - { - "key": "allocation-test", - "splits": [ - { - "variationKey": "de", - "shards": [ - { - "salt": "split-json-flag", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 2500 - } - ] - } - ] - }, - { - "variationKey": "ua", - "shards": [ - { - "salt": "split-json-flag", - "totalShards": 10000, - "ranges": [ - { - "start": 2500, - "end": 5000 - } - ] - } - ] - }, - { - "variationKey": "zh", - "shards": [ - { - "salt": "split-json-flag", - "totalShards": 10000, - "ranges": [ - { - "start": 5000, - "end": 7500 - } - ] - } - ] - }, - { - "variationKey": "emoji", - "shards": [ - { - "salt": "split-json-flag", - "totalShards": 10000, - "ranges": [ - { - "start": 7500, - "end": 10000 - } - ] - } - ] - } - ], - "doLog": true - }, - { - "key": "allocation-default", - "splits": [ - { - "variationKey": "de", - "shards": [] - } - ], - "doLog": false - } - ] - }, - "string_flag_with_special_characters": { - "key": "string_flag_with_special_characters", - "enabled": true, - "comment": "Testing the string with special characters and spaces", - "variationType": "STRING", - "variations": { - "string_with_spaces": { - "key": "string_with_spaces", - "value": " a b c d e f " - }, - "string_with_only_one_space": { - "key": "string_with_only_one_space", - "value": " " - }, - "string_with_only_multiple_spaces": { - "key": "string_with_only_multiple_spaces", - "value": " " - }, - "string_with_dots": { - "key": "string_with_dots", - "value": ".a.b.c.d.e.f." - }, - "string_with_only_one_dot": { - "key": "string_with_only_one_dot", - "value": "." - }, - "string_with_only_multiple_dots": { - "key": "string_with_only_multiple_dots", - "value": "......." - }, - "string_with_comas": { - "key": "string_with_comas", - "value": ",a,b,c,d,e,f," - }, - "string_with_only_one_coma": { - "key": "string_with_only_one_coma", - "value": "," - }, - "string_with_only_multiple_comas": { - "key": "string_with_only_multiple_comas", - "value": ",,,,,,," - }, - "string_with_colons": { - "key": "string_with_colons", - "value": ":a:b:c:d:e:f:" - }, - "string_with_only_one_colon": { - "key": "string_with_only_one_colon", - "value": ":" - }, - "string_with_only_multiple_colons": { - "key": "string_with_only_multiple_colons", - "value": ":::::::" - }, - "string_with_semicolons": { - "key": "string_with_semicolons", - "value": ";a;b;c;d;e;f;" - }, - "string_with_only_one_semicolon": { - "key": "string_with_only_one_semicolon", - "value": ";" - }, - "string_with_only_multiple_semicolons": { - "key": "string_with_only_multiple_semicolons", - "value": ";;;;;;;" - }, - "string_with_slashes": { - "key": "string_with_slashes", - "value": "/a/b/c/d/e/f/" - }, - "string_with_only_one_slash": { - "key": "string_with_only_one_slash", - "value": "/" - }, - "string_with_only_multiple_slashes": { - "key": "string_with_only_multiple_slashes", - "value": "///////" - }, - "string_with_dashes": { - "key": "string_with_dashes", - "value": "-a-b-c-d-e-f-" - }, - "string_with_only_one_dash": { - "key": "string_with_only_one_dash", - "value": "-" - }, - "string_with_only_multiple_dashes": { - "key": "string_with_only_multiple_dashes", - "value": "-------" - }, - "string_with_underscores": { - "key": "string_with_underscores", - "value": "_a_b_c_d_e_f_" - }, - "string_with_only_one_underscore": { - "key": "string_with_only_one_underscore", - "value": "_" - }, - "string_with_only_multiple_underscores": { - "key": "string_with_only_multiple_underscores", - "value": "_______" - }, - "string_with_plus_signs": { - "key": "string_with_plus_signs", - "value": "+a+b+c+d+e+f+" - }, - "string_with_only_one_plus_sign": { - "key": "string_with_only_one_plus_sign", - "value": "+" - }, - "string_with_only_multiple_plus_signs": { - "key": "string_with_only_multiple_plus_signs", - "value": "+++++++" - }, - "string_with_equal_signs": { - "key": "string_with_equal_signs", - "value": "=a=b=c=d=e=f=" - }, - "string_with_only_one_equal_sign": { - "key": "string_with_only_one_equal_sign", - "value": "=" - }, - "string_with_only_multiple_equal_signs": { - "key": "string_with_only_multiple_equal_signs", - "value": "=======" - }, - "string_with_dollar_signs": { - "key": "string_with_dollar_signs", - "value": "$a$b$c$d$e$f$" - }, - "string_with_only_one_dollar_sign": { - "key": "string_with_only_one_dollar_sign", - "value": "$" - }, - "string_with_only_multiple_dollar_signs": { - "key": "string_with_only_multiple_dollar_signs", - "value": "$$$$$$$" - }, - "string_with_at_signs": { - "key": "string_with_at_signs", - "value": "@a@b@c@d@e@f@" - }, - "string_with_only_one_at_sign": { - "key": "string_with_only_one_at_sign", - "value": "@" - }, - "string_with_only_multiple_at_signs": { - "key": "string_with_only_multiple_at_signs", - "value": "@@@@@@@" - }, - "string_with_amp_signs": { - "key": "string_with_amp_signs", - "value": "&a&b&c&d&e&f&" - }, - "string_with_only_one_amp_sign": { - "key": "string_with_only_one_amp_sign", - "value": "&" - }, - "string_with_only_multiple_amp_signs": { - "key": "string_with_only_multiple_amp_signs", - "value": "&&&&&&&" - }, - "string_with_hash_signs": { - "key": "string_with_hash_signs", - "value": "#a#b#c#d#e#f#" - }, - "string_with_only_one_hash_sign": { - "key": "string_with_only_one_hash_sign", - "value": "#" - }, - "string_with_only_multiple_hash_signs": { - "key": "string_with_only_multiple_hash_signs", - "value": "#######" - }, - "string_with_percentage_signs": { - "key": "string_with_percentage_signs", - "value": "%a%b%c%d%e%f%" - }, - "string_with_only_one_percentage_sign": { - "key": "string_with_only_one_percentage_sign", - "value": "%" - }, - "string_with_only_multiple_percentage_signs": { - "key": "string_with_only_multiple_percentage_signs", - "value": "%%%%%%%" - }, - "string_with_tilde_signs": { - "key": "string_with_tilde_signs", - "value": "~a~b~c~d~e~f~" - }, - "string_with_only_one_tilde_sign": { - "key": "string_with_only_one_tilde_sign", - "value": "~" - }, - "string_with_only_multiple_tilde_signs": { - "key": "string_with_only_multiple_tilde_signs", - "value": "~~~~~~~" - }, - "string_with_asterix_signs": { - "key": "string_with_asterix_signs", - "value": "*a*b*c*d*e*f*" - }, - "string_with_only_one_asterix_sign": { - "key": "string_with_only_one_asterix_sign", - "value": "*" - }, - "string_with_only_multiple_asterix_signs": { - "key": "string_with_only_multiple_asterix_signs", - "value": "*******" - }, - "string_with_single_quotes": { - "key": "string_with_single_quotes", - "value": "'a'b'c'd'e'f'" - }, - "string_with_only_one_single_quote": { - "key": "string_with_only_one_single_quote", - "value": "'" - }, - "string_with_only_multiple_single_quotes": { - "key": "string_with_only_multiple_single_quotes", - "value": "'''''''" - }, - "string_with_question_marks": { - "key": "string_with_question_marks", - "value": "?a?b?c?d?e?f?" - }, - "string_with_only_one_question_mark": { - "key": "string_with_only_one_question_mark", - "value": "?" - }, - "string_with_only_multiple_question_marks": { - "key": "string_with_only_multiple_question_marks", - "value": "???????" - }, - "string_with_exclamation_marks": { - "key": "string_with_exclamation_marks", - "value": "!a!b!c!d!e!f!" - }, - "string_with_only_one_exclamation_mark": { - "key": "string_with_only_one_exclamation_mark", - "value": "!" - }, - "string_with_only_multiple_exclamation_marks": { - "key": "string_with_only_multiple_exclamation_marks", - "value": "!!!!!!!" - }, - "string_with_opening_parentheses": { - "key": "string_with_opening_parentheses", - "value": "(a(b(c(d(e(f(" - }, - "string_with_only_one_opening_parenthese": { - "key": "string_with_only_one_opening_parenthese", - "value": "(" - }, - "string_with_only_multiple_opening_parentheses": { - "key": "string_with_only_multiple_opening_parentheses", - "value": "(((((((" - }, - "string_with_closing_parentheses": { - "key": "string_with_closing_parentheses", - "value": ")a)b)c)d)e)f)" - }, - "string_with_only_one_closing_parenthese": { - "key": "string_with_only_one_closing_parenthese", - "value": ")" - }, - "string_with_only_multiple_closing_parentheses": { - "key": "string_with_only_multiple_closing_parentheses", - "value": ")))))))" - } - }, - "allocations": [ - { - "key": "allocation-test-string_with_spaces", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_spaces", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_spaces", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_space", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_space", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_space", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_spaces", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_spaces", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_spaces", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_dots", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_dots", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_dots", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_dot", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_dot", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_dot", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_dots", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_dots", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_dots", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_comas", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_comas", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_comas", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_coma", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_coma", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_coma", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_comas", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_comas", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_comas", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_colons", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_colons", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_colons", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_colon", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_colon", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_colon", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_colons", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_colons", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_colons", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_semicolons", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_semicolons", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_semicolons", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_semicolon", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_semicolon", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_semicolon", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_semicolons", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_semicolons", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_semicolons", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_slashes", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_slashes", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_slashes", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_slash", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_slash", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_slash", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_slashes", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_slashes", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_slashes", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_dashes", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_dashes", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_dashes", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_dash", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_dash", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_dash", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_dashes", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_dashes", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_dashes", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_underscores", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_underscores", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_underscores", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_underscore", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_underscore", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_underscore", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_underscores", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_underscores", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_underscores", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_plus_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_plus_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_plus_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_plus_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_plus_sign", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_plus_sign", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_plus_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_plus_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_plus_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_equal_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_equal_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_equal_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_equal_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_equal_sign", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_equal_sign", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_equal_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_equal_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_equal_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_dollar_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_dollar_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_dollar_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_dollar_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_dollar_sign", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_dollar_sign", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_dollar_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_dollar_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_dollar_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_at_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_at_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_at_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_at_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_at_sign", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_at_sign", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_at_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_at_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_at_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_amp_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_amp_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_amp_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_amp_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_amp_sign", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_amp_sign", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_amp_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_amp_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_amp_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_hash_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_hash_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_hash_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_hash_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_hash_sign", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_hash_sign", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_hash_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_hash_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_hash_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_percentage_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_percentage_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_percentage_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_percentage_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_percentage_sign", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_percentage_sign", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_percentage_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_percentage_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_percentage_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_tilde_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_tilde_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_tilde_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_tilde_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_tilde_sign", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_tilde_sign", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_tilde_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_tilde_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_tilde_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_asterix_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_asterix_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_asterix_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_asterix_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_asterix_sign", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_asterix_sign", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_asterix_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_asterix_signs", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_asterix_signs", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_single_quotes", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_single_quotes", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_single_quotes", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_single_quote", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_single_quote", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_single_quote", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_single_quotes", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_single_quotes", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_single_quotes", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_question_marks", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_question_marks", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_question_marks", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_question_mark", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_question_mark", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_question_mark", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_question_marks", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_question_marks", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_question_marks", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_exclamation_marks", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_exclamation_marks", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_exclamation_marks", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_exclamation_mark", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_exclamation_mark", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_exclamation_mark", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_exclamation_marks", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_exclamation_marks", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_exclamation_marks", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_opening_parentheses", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_opening_parentheses", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_opening_parentheses", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_opening_parenthese", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_opening_parenthese", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_opening_parenthese", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_opening_parentheses", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_opening_parentheses", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_opening_parentheses", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_closing_parentheses", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_closing_parentheses", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_closing_parentheses", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_one_closing_parenthese", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_closing_parenthese", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_one_closing_parenthese", - "shards": [] - } - ], - "doLog": true - }, - { - "key": "allocation-test-string_with_only_multiple_closing_parentheses", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_closing_parentheses", - "operator": "ONE_OF", - "value": [ - "true" - ] - } - ] - } - ], - "splits": [ - { - "variationKey": "string_with_only_multiple_closing_parentheses", - "shards": [] - } - ], - "doLog": true - } - ] - } - } -} diff --git a/datadog-ffe/tests/data/tests/test-case-boolean-one-of-matches.json b/datadog-ffe/tests/data/tests/test-case-boolean-one-of-matches.json deleted file mode 100644 index 6bfbf0effa..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-boolean-one-of-matches.json +++ /dev/null @@ -1,240 +0,0 @@ -[ - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "alice", - "attributes": { - "one_of_flag": true - }, - "result": { - "value": 1, - "variant": "1", - "flagMetadata": { - "allocationKey": "1-for-one-of", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "bob", - "attributes": { - "one_of_flag": false - }, - "result": { - "value": 0 - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "charlie", - "attributes": { - "one_of_flag": "True" - }, - "result": { - "value": 0 - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "derek", - "attributes": { - "matches_flag": true - }, - "result": { - "value": 2, - "variant": "2", - "flagMetadata": { - "allocationKey": "2-for-matches", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "erica", - "attributes": { - "matches_flag": false - }, - "result": { - "value": 0 - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "frank", - "attributes": { - "not_matches_flag": false - }, - "result": { - "value": 0 - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "george", - "attributes": { - "not_matches_flag": true - }, - "result": { - "value": 4, - "variant": "4", - "flagMetadata": { - "allocationKey": "4-for-not-matches", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "haley", - "attributes": { - "not_matches_flag": "False" - }, - "result": { - "value": 4, - "variant": "4", - "flagMetadata": { - "allocationKey": "4-for-not-matches", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "ivy", - "attributes": { - "not_one_of_flag": true - }, - "result": { - "value": 3, - "variant": "3", - "flagMetadata": { - "allocationKey": "3-for-not-one-of", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "julia", - "attributes": { - "not_one_of_flag": false - }, - "result": { - "value": 0 - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "kim", - "attributes": { - "not_one_of_flag": "False" - }, - "result": { - "value": 3, - "variant": "3", - "flagMetadata": { - "allocationKey": "3-for-not-one-of", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "lucas", - "attributes": { - "not_one_of_flag": "true" - }, - "result": { - "value": 3, - "variant": "3", - "flagMetadata": { - "allocationKey": "3-for-not-one-of", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "mike", - "attributes": { - "not_one_of_flag": "false" - }, - "result": { - "value": 0 - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "nicole", - "attributes": { - "null_flag": "null" - }, - "result": { - "value": 5, - "variant": "5", - "flagMetadata": { - "allocationKey": "5-for-matches-null", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "owen", - "attributes": { - "null_flag": null - }, - "result": { - "value": 0 - } - }, - { - "flag": "boolean-one-of-matches", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "pete", - "attributes": {}, - "result": { - "value": 0 - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-comparator-operator-flag.json b/datadog-ffe/tests/data/tests/test-case-comparator-operator-flag.json deleted file mode 100644 index a5c8ef07cd..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-comparator-operator-flag.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "flag": "comparator-operator-test", - "variationType": "STRING", - "defaultValue": "unknown", - "targetingKey": "alice", - "attributes": { - "size": 5, - "country": "US" - }, - "result": { - "value": "small", - "variant": "small", - "flagMetadata": { - "allocationKey": "small-size", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "comparator-operator-test", - "variationType": "STRING", - "defaultValue": "unknown", - "targetingKey": "bob", - "attributes": { - "size": 10, - "country": "Canada" - }, - "result": { - "value": "medium", - "variant": "medium", - "flagMetadata": { - "allocationKey": "medum-size", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "comparator-operator-test", - "variationType": "STRING", - "defaultValue": "unknown", - "targetingKey": "charlie", - "attributes": { - "size": 25 - }, - "result": { - "value": "unknown" - } - }, - { - "flag": "comparator-operator-test", - "variationType": "STRING", - "defaultValue": "unknown", - "targetingKey": "david", - "attributes": { - "size": 26 - }, - "result": { - "value": "large", - "variant": "large", - "flagMetadata": { - "allocationKey": "large-size", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "comparator-operator-test", - "variationType": "STRING", - "defaultValue": "unknown", - "targetingKey": "elize", - "attributes": { - "country": "UK" - }, - "result": { - "value": "unknown" - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-disabled-flag.json b/datadog-ffe/tests/data/tests/test-case-disabled-flag.json deleted file mode 100644 index 0da79189ad..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-disabled-flag.json +++ /dev/null @@ -1,40 +0,0 @@ -[ - { - "flag": "disabled_flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": 0 - } - }, - { - "flag": "disabled_flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": 0 - } - }, - { - "flag": "disabled_flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "charlie", - "attributes": { - "age": 50 - }, - "result": { - "value": 0 - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-empty-flag.json b/datadog-ffe/tests/data/tests/test-case-empty-flag.json deleted file mode 100644 index 52100b1fe4..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-empty-flag.json +++ /dev/null @@ -1,40 +0,0 @@ -[ - { - "flag": "empty_flag", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": "default_value" - } - }, - { - "flag": "empty_flag", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": "default_value" - } - }, - { - "flag": "empty_flag", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "charlie", - "attributes": { - "age": 50 - }, - "result": { - "value": "default_value" - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-flag-with-empty-string.json b/datadog-ffe/tests/data/tests/test-case-flag-with-empty-string.json deleted file mode 100644 index 32a1c1febb..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-flag-with-empty-string.json +++ /dev/null @@ -1,36 +0,0 @@ -[ - { - "flag": "empty_string_flag", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "alice", - "attributes": { - "country": "US" - }, - "result": { - "value": "", - "variant": "empty_string", - "flagMetadata": { - "allocationKey": "allocation-empty", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "empty_string_flag", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "bob", - "attributes": {}, - "result": { - "value": "non_empty", - "variant": "non_empty", - "flagMetadata": { - "allocationKey": "allocation-test", - "variationType": "string", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-integer-flag.json b/datadog-ffe/tests/data/tests/test-case-integer-flag.json deleted file mode 100644 index 4a41d042f6..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-integer-flag.json +++ /dev/null @@ -1,382 +0,0 @@ -[ - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": 3, - "variant": "three", - "flagMetadata": { - "allocationKey": "targeted allocation", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": 3, - "variant": "three", - "flagMetadata": { - "allocationKey": "targeted allocation", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "charlie", - "attributes": { - "age": 50 - }, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "debra", - "attributes": { - "email": "test@test.com", - "country": "Mexico", - "age": 25 - }, - "result": { - "value": 3, - "variant": "three", - "flagMetadata": { - "allocationKey": "targeted allocation", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "1", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "2", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "3", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "4", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "5", - "attributes": {}, - "result": { - "value": 1, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "6", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "7", - "attributes": {}, - "result": { - "value": 1, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "8", - "attributes": {}, - "result": { - "value": 1, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "9", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "10", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "11", - "attributes": {}, - "result": { - "value": 1, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "12", - "attributes": {}, - "result": { - "value": 1, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "13", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "14", - "attributes": {}, - "result": { - "value": 1, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "15", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "16", - "attributes": {}, - "result": { - "value": 2, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "17", - "attributes": {}, - "result": { - "value": 1, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "18", - "attributes": {}, - "result": { - "value": 1, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "integer-flag", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "19", - "attributes": {}, - "result": { - "value": 1, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "number", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-kill-switch-flag.json b/datadog-ffe/tests/data/tests/test-case-kill-switch-flag.json deleted file mode 100644 index 29e65ba5bb..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-kill-switch-flag.json +++ /dev/null @@ -1,434 +0,0 @@ -[ - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": true, - "variant": "on", - "flagMetadata": { - "allocationKey": "on-for-NA", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": true, - "variant": "on", - "flagMetadata": { - "allocationKey": "on-for-NA", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "barbara", - "attributes": { - "email": "barbara@example.com", - "country": "canada" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "charlie", - "attributes": { - "age": 40 - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "debra", - "attributes": { - "email": "test@test.com", - "country": "Mexico", - "age": 25 - }, - "result": { - "value": true, - "variant": "on", - "flagMetadata": { - "allocationKey": "on-for-NA", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "1", - "attributes": {}, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "2", - "attributes": { - "country": "Mexico" - }, - "result": { - "value": true, - "variant": "on", - "flagMetadata": { - "allocationKey": "on-for-NA", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "3", - "attributes": { - "country": "UK", - "age": 50 - }, - "result": { - "value": true, - "variant": "on", - "flagMetadata": { - "allocationKey": "on-for-age-50+", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "4", - "attributes": { - "country": "Germany" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "5", - "attributes": { - "country": "Germany" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "6", - "attributes": { - "country": "Germany" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "7", - "attributes": { - "country": "US", - "age": 12 - }, - "result": { - "value": true, - "variant": "on", - "flagMetadata": { - "allocationKey": "on-for-NA", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "8", - "attributes": { - "country": "Italy", - "age": 60 - }, - "result": { - "value": true, - "variant": "on", - "flagMetadata": { - "allocationKey": "on-for-age-50+", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "9", - "attributes": { - "email": "email@email.com" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "10", - "attributes": {}, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "11", - "attributes": {}, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "12", - "attributes": { - "country": "US" - }, - "result": { - "value": true, - "variant": "on", - "flagMetadata": { - "allocationKey": "on-for-NA", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "13", - "attributes": { - "country": "Canada" - }, - "result": { - "value": true, - "variant": "on", - "flagMetadata": { - "allocationKey": "on-for-NA", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "14", - "attributes": {}, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "15", - "attributes": { - "country": "Denmark" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "16", - "attributes": { - "country": "Norway" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "17", - "attributes": { - "country": "UK" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "18", - "attributes": { - "country": "UK" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - }, - { - "flag": "kill-switch", - "variationType": "BOOLEAN", - "defaultValue": false, - "targetingKey": "19", - "attributes": { - "country": "UK" - }, - "result": { - "value": false, - "variant": "off", - "flagMetadata": { - "allocationKey": "off-for-all", - "variationType": "boolean", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-new-user-onboarding-flag.json b/datadog-ffe/tests/data/tests/test-case-new-user-onboarding-flag.json deleted file mode 100644 index 3845597270..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-new-user-onboarding-flag.json +++ /dev/null @@ -1,420 +0,0 @@ -[ - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": "green", - "variant": "green", - "flagMetadata": { - "allocationKey": "internal users", - "variationType": "string", - "doLog": false - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": "default" - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "charlie", - "attributes": { - "age": 50 - }, - "result": { - "value": "default" - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "debra", - "attributes": { - "email": "test@test.com", - "country": "Mexico", - "age": 25 - }, - "result": { - "value": "blue", - "variant": "blue", - "flagMetadata": { - "allocationKey": "rollout", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "zach", - "attributes": { - "email": "test@test.com", - "country": "Mexico", - "age": 25 - }, - "result": { - "value": "purple", - "variant": "purple", - "flagMetadata": { - "allocationKey": "id rule", - "variationType": "string", - "doLog": false - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "zach", - "attributes": { - "id": "override-id", - "email": "test@test.com", - "country": "Mexico", - "age": 25 - }, - "result": { - "value": "blue", - "variant": "blue", - "flagMetadata": { - "allocationKey": "rollout", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "Zach", - "attributes": { - "email": "test@test.com", - "country": "Mexico", - "age": 25 - }, - "result": { - "value": "default" - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "1", - "attributes": {}, - "result": { - "value": "default" - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "2", - "attributes": { - "country": "Mexico" - }, - "result": { - "value": "blue", - "variant": "blue", - "flagMetadata": { - "allocationKey": "rollout", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "3", - "attributes": { - "country": "UK", - "age": 33 - }, - "result": { - "value": "control", - "variant": "control", - "flagMetadata": { - "allocationKey": "experiment", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "4", - "attributes": { - "country": "Germany" - }, - "result": { - "value": "red", - "variant": "red", - "flagMetadata": { - "allocationKey": "experiment", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "5", - "attributes": { - "country": "Germany" - }, - "result": { - "value": "yellow", - "variant": "yellow", - "flagMetadata": { - "allocationKey": "experiment", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "6", - "attributes": { - "country": "Germany" - }, - "result": { - "value": "yellow", - "variant": "yellow", - "flagMetadata": { - "allocationKey": "experiment", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "7", - "attributes": { - "country": "US" - }, - "result": { - "value": "blue", - "variant": "blue", - "flagMetadata": { - "allocationKey": "rollout", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "8", - "attributes": { - "country": "Italy" - }, - "result": { - "value": "red", - "variant": "red", - "flagMetadata": { - "allocationKey": "experiment", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "9", - "attributes": { - "email": "email@email.com" - }, - "result": { - "value": "default" - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "10", - "attributes": {}, - "result": { - "value": "default" - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "11", - "attributes": {}, - "result": { - "value": "default" - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "12", - "attributes": { - "country": "US" - }, - "result": { - "value": "blue", - "variant": "blue", - "flagMetadata": { - "allocationKey": "rollout", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "13", - "attributes": { - "country": "Canada" - }, - "result": { - "value": "blue", - "variant": "blue", - "flagMetadata": { - "allocationKey": "rollout", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "14", - "attributes": {}, - "result": { - "value": "default" - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "15", - "attributes": { - "country": "Denmark" - }, - "result": { - "value": "yellow", - "variant": "yellow", - "flagMetadata": { - "allocationKey": "experiment", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "16", - "attributes": { - "country": "Norway" - }, - "result": { - "value": "control", - "variant": "control", - "flagMetadata": { - "allocationKey": "experiment", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "17", - "attributes": { - "country": "UK" - }, - "result": { - "value": "control", - "variant": "control", - "flagMetadata": { - "allocationKey": "experiment", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "18", - "attributes": { - "country": "UK" - }, - "result": { - "value": "default" - } - }, - { - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": "19", - "attributes": { - "country": "UK" - }, - "result": { - "value": "red", - "variant": "red", - "flagMetadata": { - "allocationKey": "experiment", - "variationType": "string", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-no-allocations-flag.json b/datadog-ffe/tests/data/tests/test-case-no-allocations-flag.json deleted file mode 100644 index 132c39db32..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-no-allocations-flag.json +++ /dev/null @@ -1,52 +0,0 @@ -[ - { - "flag": "no_allocations_flag", - "variationType": "JSON", - "defaultValue": { - "hello": "world" - }, - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": { - "hello": "world" - } - } - }, - { - "flag": "no_allocations_flag", - "variationType": "JSON", - "defaultValue": { - "hello": "world" - }, - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": { - "hello": "world" - } - } - }, - { - "flag": "no_allocations_flag", - "variationType": "JSON", - "defaultValue": { - "hello": "world" - }, - "targetingKey": "charlie", - "attributes": { - "age": 50 - }, - "result": { - "value": { - "hello": "world" - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-null-operator-flag.json b/datadog-ffe/tests/data/tests/test-case-null-operator-flag.json deleted file mode 100644 index dd5c687b89..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-null-operator-flag.json +++ /dev/null @@ -1,94 +0,0 @@ -[ - { - "flag": "null-operator-test", - "variationType": "STRING", - "defaultValue": "default-null", - "targetingKey": "alice", - "attributes": { - "size": 5, - "country": "US" - }, - "result": { - "value": "old", - "variant": "old", - "flagMetadata": { - "allocationKey": "null-operator", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "null-operator-test", - "variationType": "STRING", - "defaultValue": "default-null", - "targetingKey": "bob", - "attributes": { - "size": 10, - "country": "Canada" - }, - "result": { - "value": "new", - "variant": "new", - "flagMetadata": { - "allocationKey": "not-null-operator", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "null-operator-test", - "variationType": "STRING", - "defaultValue": "default-null", - "targetingKey": "charlie", - "attributes": { - "size": null - }, - "result": { - "value": "old", - "variant": "old", - "flagMetadata": { - "allocationKey": "null-operator", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "null-operator-test", - "variationType": "STRING", - "defaultValue": "default-null", - "targetingKey": "david", - "attributes": { - "size": 26 - }, - "result": { - "value": "new", - "variant": "new", - "flagMetadata": { - "allocationKey": "not-null-operator", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "null-operator-test", - "variationType": "STRING", - "defaultValue": "default-null", - "targetingKey": "elize", - "attributes": { - "country": "UK" - }, - "result": { - "value": "old", - "variant": "old", - "flagMetadata": { - "allocationKey": "null-operator", - "variationType": "string", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-null-targeting-key.json b/datadog-ffe/tests/data/tests/test-case-null-targeting-key.json deleted file mode 100644 index 5394bd91fa..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-null-targeting-key.json +++ /dev/null @@ -1,40 +0,0 @@ -[ - { - "//": "successfull evaluation if flag has no sharding", - "flag": "numeric_flag", - "variationType": "NUMERIC", - "defaultValue": 42, - "targetingKey": null, - "attributes": {}, - "result": { - "value": 3.1415926 - } - }, - { - "//": "evaluation failure for flag with sharding", - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": null, - "attributes": { - "country": "France" - }, - "result": { - "value": "default" - } - }, - { - "//": "success if matched before sharding", - "flag": "new-user-onboarding", - "variationType": "STRING", - "defaultValue": "default", - "targetingKey": null, - "attributes": { - "email": "null@mycompany.com", - "country": "France" - }, - "result": { - "value": "green" - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-numeric-flag.json b/datadog-ffe/tests/data/tests/test-case-numeric-flag.json deleted file mode 100644 index 0e6ed8b1b3..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-numeric-flag.json +++ /dev/null @@ -1,58 +0,0 @@ -[ - { - "flag": "numeric_flag", - "variationType": "NUMERIC", - "defaultValue": 0.0, - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": 3.1415926, - "variant": "pi", - "flagMetadata": { - "allocationKey": "rollout", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "numeric_flag", - "variationType": "NUMERIC", - "defaultValue": 0.0, - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": 3.1415926, - "variant": "pi", - "flagMetadata": { - "allocationKey": "rollout", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "numeric_flag", - "variationType": "NUMERIC", - "defaultValue": 0.0, - "targetingKey": "charlie", - "attributes": { - "age": 50 - }, - "result": { - "value": 3.1415926, - "variant": "pi", - "flagMetadata": { - "allocationKey": "rollout", - "variationType": "number", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-numeric-one-of.json b/datadog-ffe/tests/data/tests/test-case-numeric-one-of.json deleted file mode 100644 index 5ab68af519..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-numeric-one-of.json +++ /dev/null @@ -1,122 +0,0 @@ -[ - { - "flag": "numeric-one-of", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "alice", - "attributes": { - "number": 1 - }, - "result": { - "value": 1, - "variant": "1", - "flagMetadata": { - "allocationKey": "1-for-1", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "numeric-one-of", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "bob", - "attributes": { - "number": 2 - }, - "result": { - "value": 0 - } - }, - { - "flag": "numeric-one-of", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "charlie", - "attributes": { - "number": 3 - }, - "result": { - "value": 3, - "variant": "3", - "flagMetadata": { - "allocationKey": "3-for-not-2", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "numeric-one-of", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "derek", - "attributes": { - "number": 4 - }, - "result": { - "value": 3, - "variant": "3", - "flagMetadata": { - "allocationKey": "3-for-not-2", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "numeric-one-of", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "erica", - "attributes": { - "number": "1" - }, - "result": { - "value": 1, - "variant": "1", - "flagMetadata": { - "allocationKey": "1-for-1", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "numeric-one-of", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "frank", - "attributes": { - "number": 1 - }, - "result": { - "value": 1, - "variant": "1", - "flagMetadata": { - "allocationKey": "1-for-1", - "variationType": "number", - "doLog": true - } - } - }, - { - "flag": "numeric-one-of", - "variationType": "INTEGER", - "defaultValue": 0, - "targetingKey": "george", - "attributes": { - "number": 123456789 - }, - "result": { - "value": 2, - "variant": "2", - "flagMetadata": { - "allocationKey": "2-for-123456789", - "variationType": "number", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-regex-flag.json b/datadog-ffe/tests/data/tests/test-case-regex-flag.json deleted file mode 100644 index 952a37aabc..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-regex-flag.json +++ /dev/null @@ -1,65 +0,0 @@ -[ - { - "flag": "regex-flag", - "variationType": "STRING", - "defaultValue": "none", - "targetingKey": "alice", - "attributes": { - "version": "1.15.0", - "email": "alice@example.com" - }, - "result": { - "value": "partial-example", - "variant": "partial-example", - "flagMetadata": { - "allocationKey": "partial-example", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "regex-flag", - "variationType": "STRING", - "defaultValue": "none", - "targetingKey": "bob", - "attributes": { - "version": "0.20.1", - "email": "bob@test.com" - }, - "result": { - "value": "test", - "variant": "test", - "flagMetadata": { - "allocationKey": "test", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "regex-flag", - "variationType": "STRING", - "defaultValue": "none", - "targetingKey": "charlie", - "attributes": { - "version": "2.1.13" - }, - "result": { - "value": "none" - } - }, - { - "flag": "regex-flag", - "variationType": "STRING", - "defaultValue": "none", - "targetingKey": "derek", - "attributes": { - "version": "2.1.13", - "email": "derek@gmail.com" - }, - "result": { - "value": "none" - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-case-start-and-end-date-flag.json b/datadog-ffe/tests/data/tests/test-case-start-and-end-date-flag.json deleted file mode 100644 index caf805d143..0000000000 --- a/datadog-ffe/tests/data/tests/test-case-start-and-end-date-flag.json +++ /dev/null @@ -1,58 +0,0 @@ -[ - { - "flag": "start-and-end-date-test", - "variationType": "STRING", - "defaultValue": "unknown", - "targetingKey": "alice", - "attributes": { - "version": "1.15.0", - "country": "US" - }, - "result": { - "value": "current", - "variant": "current", - "flagMetadata": { - "allocationKey": "current-versions", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "start-and-end-date-test", - "variationType": "STRING", - "defaultValue": "unknown", - "targetingKey": "bob", - "attributes": { - "version": "0.20.1", - "country": "Canada" - }, - "result": { - "value": "current", - "variant": "current", - "flagMetadata": { - "allocationKey": "current-versions", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "start-and-end-date-test", - "variationType": "STRING", - "defaultValue": "unknown", - "targetingKey": "charlie", - "attributes": { - "version": "2.1.13" - }, - "result": { - "value": "current", - "variant": "current", - "flagMetadata": { - "allocationKey": "current-versions", - "variationType": "string", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-flag-that-does-not-exist.json b/datadog-ffe/tests/data/tests/test-flag-that-does-not-exist.json deleted file mode 100644 index 7499bba1c5..0000000000 --- a/datadog-ffe/tests/data/tests/test-flag-that-does-not-exist.json +++ /dev/null @@ -1,40 +0,0 @@ -[ - { - "flag": "flag-that-does-not-exist", - "variationType": "NUMERIC", - "defaultValue": 0.0, - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": 0.0 - } - }, - { - "flag": "flag-that-does-not-exist", - "variationType": "NUMERIC", - "defaultValue": 0.0, - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": 0.0 - } - }, - { - "flag": "flag-that-does-not-exist", - "variationType": "NUMERIC", - "defaultValue": 0.0, - "targetingKey": "charlie", - "attributes": { - "age": 50 - }, - "result": { - "value": 0.0 - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-json-config-flag.json b/datadog-ffe/tests/data/tests/test-json-config-flag.json deleted file mode 100644 index 3d4478ff71..0000000000 --- a/datadog-ffe/tests/data/tests/test-json-config-flag.json +++ /dev/null @@ -1,96 +0,0 @@ -[ - { - "flag": "json-config-flag", - "variationType": "JSON", - "defaultValue": { - "foo": "bar" - }, - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": { - "integer": 1, - "string": "one", - "float": 1.0 - }, - "variant": "one", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "object", - "doLog": true - } - } - }, - { - "flag": "json-config-flag", - "variationType": "JSON", - "defaultValue": { - "foo": "bar" - }, - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": { - "integer": 2, - "string": "two", - "float": 2.0 - }, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "object", - "doLog": true - } - } - }, - { - "flag": "json-config-flag", - "variationType": "JSON", - "defaultValue": { - "foo": "bar" - }, - "targetingKey": "charlie", - "attributes": { - "age": 50 - }, - "result": { - "value": { - "integer": 2, - "string": "two", - "float": 2.0 - }, - "variant": "two", - "flagMetadata": { - "allocationKey": "50/50 split", - "variationType": "object", - "doLog": true - } - } - }, - { - "flag": "json-config-flag", - "variationType": "JSON", - "defaultValue": { - "foo": "bar" - }, - "targetingKey": "diana", - "attributes": { - "Force Empty": true - }, - "result": { - "value": {}, - "variant": "empty", - "flagMetadata": { - "allocationKey": "Optionally Force Empty", - "variationType": "object", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-no-allocations-flag.json b/datadog-ffe/tests/data/tests/test-no-allocations-flag.json deleted file mode 100644 index 45867e5897..0000000000 --- a/datadog-ffe/tests/data/tests/test-no-allocations-flag.json +++ /dev/null @@ -1,52 +0,0 @@ -[ - { - "flag": "no_allocations_flag", - "variationType": "JSON", - "defaultValue": { - "message": "Hello, world!" - }, - "targetingKey": "alice", - "attributes": { - "email": "alice@mycompany.com", - "country": "US" - }, - "result": { - "value": { - "message": "Hello, world!" - } - } - }, - { - "flag": "no_allocations_flag", - "variationType": "JSON", - "defaultValue": { - "message": "Hello, world!" - }, - "targetingKey": "bob", - "attributes": { - "email": "bob@example.com", - "country": "Canada" - }, - "result": { - "value": { - "message": "Hello, world!" - } - } - }, - { - "flag": "no_allocations_flag", - "variationType": "JSON", - "defaultValue": { - "message": "Hello, world!" - }, - "targetingKey": "charlie", - "attributes": { - "age": 50 - }, - "result": { - "value": { - "message": "Hello, world!" - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-special-characters.json b/datadog-ffe/tests/data/tests/test-special-characters.json deleted file mode 100644 index 59ef5cbe87..0000000000 --- a/datadog-ffe/tests/data/tests/test-special-characters.json +++ /dev/null @@ -1,78 +0,0 @@ -[ - { - "flag": "special-characters", - "variationType": "JSON", - "defaultValue": {}, - "targetingKey": "ash", - "attributes": {}, - "result": { - "value": { - "a": "kümmert", - "b": "schön" - }, - "variant": "de", - "flagMetadata": { - "allocationKey": "allocation-test", - "variationType": "object", - "doLog": true - } - } - }, - { - "flag": "special-characters", - "variationType": "JSON", - "defaultValue": {}, - "targetingKey": "ben", - "attributes": {}, - "result": { - "value": { - "a": "піклуватися", - "b": "любов" - }, - "variant": "ua", - "flagMetadata": { - "allocationKey": "allocation-test", - "variationType": "object", - "doLog": true - } - } - }, - { - "flag": "special-characters", - "variationType": "JSON", - "defaultValue": {}, - "targetingKey": "cameron", - "attributes": {}, - "result": { - "value": { - "a": "照顾", - "b": "漂亮" - }, - "variant": "zh", - "flagMetadata": { - "allocationKey": "allocation-test", - "variationType": "object", - "doLog": true - } - } - }, - { - "flag": "special-characters", - "variationType": "JSON", - "defaultValue": {}, - "targetingKey": "darryl", - "attributes": {}, - "result": { - "value": { - "a": "🤗", - "b": "🌸" - }, - "variant": "emoji", - "flagMetadata": { - "allocationKey": "allocation-test", - "variationType": "object", - "doLog": true - } - } - } -] diff --git a/datadog-ffe/tests/data/tests/test-string-with-special-characters.json b/datadog-ffe/tests/data/tests/test-string-with-special-characters.json deleted file mode 100644 index 27d063122c..0000000000 --- a/datadog-ffe/tests/data/tests/test-string-with-special-characters.json +++ /dev/null @@ -1,1190 +0,0 @@ -[ - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_spaces", - "attributes": { - "string_with_spaces": true - }, - "result": { - "value": " a b c d e f ", - "variant": "string_with_spaces", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_spaces", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_space", - "attributes": { - "string_with_only_one_space": true - }, - "result": { - "value": " ", - "variant": "string_with_only_one_space", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_space", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_spaces", - "attributes": { - "string_with_only_multiple_spaces": true - }, - "result": { - "value": " ", - "variant": "string_with_only_multiple_spaces", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_spaces", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_dots", - "attributes": { - "string_with_dots": true - }, - "result": { - "value": ".a.b.c.d.e.f.", - "variant": "string_with_dots", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_dots", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_dot", - "attributes": { - "string_with_only_one_dot": true - }, - "result": { - "value": ".", - "variant": "string_with_only_one_dot", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_dot", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_dots", - "attributes": { - "string_with_only_multiple_dots": true - }, - "result": { - "value": ".......", - "variant": "string_with_only_multiple_dots", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_dots", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_comas", - "attributes": { - "string_with_comas": true - }, - "result": { - "value": ",a,b,c,d,e,f,", - "variant": "string_with_comas", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_comas", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_coma", - "attributes": { - "string_with_only_one_coma": true - }, - "result": { - "value": ",", - "variant": "string_with_only_one_coma", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_coma", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_comas", - "attributes": { - "string_with_only_multiple_comas": true - }, - "result": { - "value": ",,,,,,,", - "variant": "string_with_only_multiple_comas", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_comas", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_colons", - "attributes": { - "string_with_colons": true - }, - "result": { - "value": ":a:b:c:d:e:f:", - "variant": "string_with_colons", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_colons", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_colon", - "attributes": { - "string_with_only_one_colon": true - }, - "result": { - "value": ":", - "variant": "string_with_only_one_colon", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_colon", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_colons", - "attributes": { - "string_with_only_multiple_colons": true - }, - "result": { - "value": ":::::::", - "variant": "string_with_only_multiple_colons", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_colons", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_semicolons", - "attributes": { - "string_with_semicolons": true - }, - "result": { - "value": ";a;b;c;d;e;f;", - "variant": "string_with_semicolons", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_semicolons", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_semicolon", - "attributes": { - "string_with_only_one_semicolon": true - }, - "result": { - "value": ";", - "variant": "string_with_only_one_semicolon", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_semicolon", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_semicolons", - "attributes": { - "string_with_only_multiple_semicolons": true - }, - "result": { - "value": ";;;;;;;", - "variant": "string_with_only_multiple_semicolons", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_semicolons", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_slashes", - "attributes": { - "string_with_slashes": true - }, - "result": { - "value": "/a/b/c/d/e/f/", - "variant": "string_with_slashes", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_slashes", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_slash", - "attributes": { - "string_with_only_one_slash": true - }, - "result": { - "value": "/", - "variant": "string_with_only_one_slash", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_slash", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_slashes", - "attributes": { - "string_with_only_multiple_slashes": true - }, - "result": { - "value": "///////", - "variant": "string_with_only_multiple_slashes", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_slashes", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_dashes", - "attributes": { - "string_with_dashes": true - }, - "result": { - "value": "-a-b-c-d-e-f-", - "variant": "string_with_dashes", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_dashes", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_dash", - "attributes": { - "string_with_only_one_dash": true - }, - "result": { - "value": "-", - "variant": "string_with_only_one_dash", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_dash", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_dashes", - "attributes": { - "string_with_only_multiple_dashes": true - }, - "result": { - "value": "-------", - "variant": "string_with_only_multiple_dashes", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_dashes", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_underscores", - "attributes": { - "string_with_underscores": true - }, - "result": { - "value": "_a_b_c_d_e_f_", - "variant": "string_with_underscores", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_underscores", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_underscore", - "attributes": { - "string_with_only_one_underscore": true - }, - "result": { - "value": "_", - "variant": "string_with_only_one_underscore", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_underscore", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_underscores", - "attributes": { - "string_with_only_multiple_underscores": true - }, - "result": { - "value": "_______", - "variant": "string_with_only_multiple_underscores", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_underscores", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_plus_signs", - "attributes": { - "string_with_plus_signs": true - }, - "result": { - "value": "+a+b+c+d+e+f+", - "variant": "string_with_plus_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_plus_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_plus_sign", - "attributes": { - "string_with_only_one_plus_sign": true - }, - "result": { - "value": "+", - "variant": "string_with_only_one_plus_sign", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_plus_sign", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_plus_signs", - "attributes": { - "string_with_only_multiple_plus_signs": true - }, - "result": { - "value": "+++++++", - "variant": "string_with_only_multiple_plus_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_plus_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_equal_signs", - "attributes": { - "string_with_equal_signs": true - }, - "result": { - "value": "=a=b=c=d=e=f=", - "variant": "string_with_equal_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_equal_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_equal_sign", - "attributes": { - "string_with_only_one_equal_sign": true - }, - "result": { - "value": "=", - "variant": "string_with_only_one_equal_sign", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_equal_sign", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_equal_signs", - "attributes": { - "string_with_only_multiple_equal_signs": true - }, - "result": { - "value": "=======", - "variant": "string_with_only_multiple_equal_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_equal_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_dollar_signs", - "attributes": { - "string_with_dollar_signs": true - }, - "result": { - "value": "$a$b$c$d$e$f$", - "variant": "string_with_dollar_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_dollar_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_dollar_sign", - "attributes": { - "string_with_only_one_dollar_sign": true - }, - "result": { - "value": "$", - "variant": "string_with_only_one_dollar_sign", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_dollar_sign", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_dollar_signs", - "attributes": { - "string_with_only_multiple_dollar_signs": true - }, - "result": { - "value": "$$$$$$$", - "variant": "string_with_only_multiple_dollar_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_dollar_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_at_signs", - "attributes": { - "string_with_at_signs": true - }, - "result": { - "value": "@a@b@c@d@e@f@", - "variant": "string_with_at_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_at_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_at_sign", - "attributes": { - "string_with_only_one_at_sign": true - }, - "result": { - "value": "@", - "variant": "string_with_only_one_at_sign", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_at_sign", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_at_signs", - "attributes": { - "string_with_only_multiple_at_signs": true - }, - "result": { - "value": "@@@@@@@", - "variant": "string_with_only_multiple_at_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_at_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_amp_signs", - "attributes": { - "string_with_amp_signs": true - }, - "result": { - "value": "&a&b&c&d&e&f&", - "variant": "string_with_amp_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_amp_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_amp_sign", - "attributes": { - "string_with_only_one_amp_sign": true - }, - "result": { - "value": "&", - "variant": "string_with_only_one_amp_sign", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_amp_sign", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_amp_signs", - "attributes": { - "string_with_only_multiple_amp_signs": true - }, - "result": { - "value": "&&&&&&&", - "variant": "string_with_only_multiple_amp_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_amp_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_hash_signs", - "attributes": { - "string_with_hash_signs": true - }, - "result": { - "value": "#a#b#c#d#e#f#", - "variant": "string_with_hash_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_hash_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_hash_sign", - "attributes": { - "string_with_only_one_hash_sign": true - }, - "result": { - "value": "#", - "variant": "string_with_only_one_hash_sign", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_hash_sign", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_hash_signs", - "attributes": { - "string_with_only_multiple_hash_signs": true - }, - "result": { - "value": "#######", - "variant": "string_with_only_multiple_hash_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_hash_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_percentage_signs", - "attributes": { - "string_with_percentage_signs": true - }, - "result": { - "value": "%a%b%c%d%e%f%", - "variant": "string_with_percentage_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_percentage_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_percentage_sign", - "attributes": { - "string_with_only_one_percentage_sign": true - }, - "result": { - "value": "%", - "variant": "string_with_only_one_percentage_sign", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_percentage_sign", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_percentage_signs", - "attributes": { - "string_with_only_multiple_percentage_signs": true - }, - "result": { - "value": "%%%%%%%", - "variant": "string_with_only_multiple_percentage_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_percentage_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_tilde_signs", - "attributes": { - "string_with_tilde_signs": true - }, - "result": { - "value": "~a~b~c~d~e~f~", - "variant": "string_with_tilde_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_tilde_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_tilde_sign", - "attributes": { - "string_with_only_one_tilde_sign": true - }, - "result": { - "value": "~", - "variant": "string_with_only_one_tilde_sign", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_tilde_sign", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_tilde_signs", - "attributes": { - "string_with_only_multiple_tilde_signs": true - }, - "result": { - "value": "~~~~~~~", - "variant": "string_with_only_multiple_tilde_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_tilde_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_asterix_signs", - "attributes": { - "string_with_asterix_signs": true - }, - "result": { - "value": "*a*b*c*d*e*f*", - "variant": "string_with_asterix_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_asterix_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_asterix_sign", - "attributes": { - "string_with_only_one_asterix_sign": true - }, - "result": { - "value": "*", - "variant": "string_with_only_one_asterix_sign", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_asterix_sign", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_asterix_signs", - "attributes": { - "string_with_only_multiple_asterix_signs": true - }, - "result": { - "value": "*******", - "variant": "string_with_only_multiple_asterix_signs", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_asterix_signs", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_single_quotes", - "attributes": { - "string_with_single_quotes": true - }, - "result": { - "value": "'a'b'c'd'e'f'", - "variant": "string_with_single_quotes", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_single_quotes", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_single_quote", - "attributes": { - "string_with_only_one_single_quote": true - }, - "result": { - "value": "'", - "variant": "string_with_only_one_single_quote", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_single_quote", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_single_quotes", - "attributes": { - "string_with_only_multiple_single_quotes": true - }, - "result": { - "value": "'''''''", - "variant": "string_with_only_multiple_single_quotes", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_single_quotes", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_question_marks", - "attributes": { - "string_with_question_marks": true - }, - "result": { - "value": "?a?b?c?d?e?f?", - "variant": "string_with_question_marks", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_question_marks", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_question_mark", - "attributes": { - "string_with_only_one_question_mark": true - }, - "result": { - "value": "?", - "variant": "string_with_only_one_question_mark", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_question_mark", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_question_marks", - "attributes": { - "string_with_only_multiple_question_marks": true - }, - "result": { - "value": "???????", - "variant": "string_with_only_multiple_question_marks", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_question_marks", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_exclamation_marks", - "attributes": { - "string_with_exclamation_marks": true - }, - "result": { - "value": "!a!b!c!d!e!f!", - "variant": "string_with_exclamation_marks", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_exclamation_marks", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_exclamation_mark", - "attributes": { - "string_with_only_one_exclamation_mark": true - }, - "result": { - "value": "!", - "variant": "string_with_only_one_exclamation_mark", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_exclamation_mark", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_exclamation_marks", - "attributes": { - "string_with_only_multiple_exclamation_marks": true - }, - "result": { - "value": "!!!!!!!", - "variant": "string_with_only_multiple_exclamation_marks", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_exclamation_marks", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_opening_parentheses", - "attributes": { - "string_with_opening_parentheses": true - }, - "result": { - "value": "(a(b(c(d(e(f(", - "variant": "string_with_opening_parentheses", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_opening_parentheses", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_opening_parenthese", - "attributes": { - "string_with_only_one_opening_parenthese": true - }, - "result": { - "value": "(", - "variant": "string_with_only_one_opening_parenthese", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_opening_parenthese", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_opening_parentheses", - "attributes": { - "string_with_only_multiple_opening_parentheses": true - }, - "result": { - "value": "(((((((", - "variant": "string_with_only_multiple_opening_parentheses", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_opening_parentheses", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_closing_parentheses", - "attributes": { - "string_with_closing_parentheses": true - }, - "result": { - "value": ")a)b)c)d)e)f)", - "variant": "string_with_closing_parentheses", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_closing_parentheses", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_one_closing_parenthese", - "attributes": { - "string_with_only_one_closing_parenthese": true - }, - "result": { - "value": ")", - "variant": "string_with_only_one_closing_parenthese", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_one_closing_parenthese", - "variationType": "string", - "doLog": true - } - } - }, - { - "flag": "string_flag_with_special_characters", - "variationType": "STRING", - "defaultValue": "default_value", - "targetingKey": "string_with_only_multiple_closing_parentheses", - "attributes": { - "string_with_only_multiple_closing_parentheses": true - }, - "result": { - "value": ")))))))", - "variant": "string_with_only_multiple_closing_parentheses", - "flagMetadata": { - "allocationKey": "allocation-test-string_with_only_multiple_closing_parentheses", - "variationType": "string", - "doLog": true - } - } - } -] From 9faafd3423c8bcc06593d5d76f845a1e606bcac2 Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Tue, 12 May 2026 17:07:36 -0400 Subject: [PATCH 2/8] Update FFE fixture submodule --- datadog-ffe/ffe-system-test-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datadog-ffe/ffe-system-test-data b/datadog-ffe/ffe-system-test-data index 4e2492b83e..50cb302519 160000 --- a/datadog-ffe/ffe-system-test-data +++ b/datadog-ffe/ffe-system-test-data @@ -1 +1 @@ -Subproject commit 4e2492b83e450e2d5746812e9e36649ff906f6c7 +Subproject commit 50cb30251936b6ae6ad8477b75f9d618e1fdc2b5 From 393938a13e51ca7fecb0a8ae6a9960118c38ec84 Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Tue, 12 May 2026 22:38:51 -0400 Subject: [PATCH 3/8] Fix canonical FFE fixture CI paths --- .github/CODEOWNERS | 1 + .github/workflows/test-ffi.yml | 4 ++++ datadog-ffe/src/rules_based/ufc/models.rs | 2 +- examples/ffi/README.md | 2 +- examples/ffi/ffe.c | 6 +++--- tools/src/bin/ffi_test.rs | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1ad6fd8094..db05069dda 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,6 +12,7 @@ .dockerignore @DataDog/libdatadog-core .github/ @DataDog/apm-common-components-core .gitignore @DataDog/libdatadog +.gitmodules @DataDog/libdatadog .gitlab-ci.yml @DataDog/apm-common-components-core .gitlab/benchmarks.yml @DataDog/apm-common-components-core .gitlab/fuzz.yml @DataDog/chaos-platform diff --git a/.github/workflows/test-ffi.yml b/.github/workflows/test-ffi.yml index f6abbd6f08..a09ee79ccd 100644 --- a/.github/workflows/test-ffi.yml +++ b/.github/workflows/test-ffi.yml @@ -78,6 +78,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + with: + submodules: recursive - name: Setup output dir shell: bash run: | @@ -224,6 +226,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + with: + submodules: recursive - name: Set up Docker Buildx uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # 3.10.0 with: diff --git a/datadog-ffe/src/rules_based/ufc/models.rs b/datadog-ffe/src/rules_based/ufc/models.rs index 28e8f55e49..014c998bd5 100644 --- a/datadog-ffe/src/rules_based/ufc/models.rs +++ b/datadog-ffe/src/rules_based/ufc/models.rs @@ -561,7 +561,7 @@ mod tests { #[test] #[cfg_attr(miri, ignore)] // this test is way too slow on miri fn parse_flags_v1() { - let json_content = std::fs::read_to_string("tests/data/flags-v1.json").unwrap(); + let json_content = std::fs::read_to_string("ffe-system-test-data/ufc-config.json").unwrap(); let ufc: UniversalFlagConfigWire = serde_json::from_str(&json_content).unwrap(); let failures = ufc diff --git a/examples/ffi/README.md b/examples/ffi/README.md index f026f2f132..263c61498d 100644 --- a/examples/ffi/README.md +++ b/examples/ffi/README.md @@ -64,6 +64,6 @@ The build command creates executables in the `examples/ffi/build` folder: - **crashtracking**: This example may intentionally trigger a crash to test crash handling. Consider adding it to the skip list in `tools/src/bin/ffi_test.rs` if running it causes issues. -- Tests run in a temporary directory. Test data paths (like `datadog-ffe/tests/data`) are +- Tests run in a temporary directory. Test data paths (like `datadog-ffe/ffe-system-test-data`) are symlinked into the temp directory automatically. - Generated artifacts are listed at the end of the run and cleaned up unless `--keep-artifacts` is used. diff --git a/examples/ffi/ffe.c b/examples/ffi/ffe.c index 55ee6f8ce6..cb3b6afcd2 100644 --- a/examples/ffi/ffe.c +++ b/examples/ffi/ffe.c @@ -189,8 +189,8 @@ int main(int argc, char* argv[]) { if (argc > 1) { config_path = argv[1]; } else { - // Default to the test data file - config_path = "./datadog-ffe/tests/data/flags-v1.json"; + // Default to the canonical FFE test data file + config_path = "./datadog-ffe/ffe-system-test-data/ufc-config.json"; } printf("Step 1: Loading configuration from file...\n"); @@ -227,7 +227,7 @@ int main(int argc, char* argv[]) { printf("\nStep 2: Creating evaluation context...\n"); // Define some attributes for the evaluation context - // These attributes match targeting rules in the flags-v1.json test data + // These attributes match targeting rules in the canonical UFC test data struct ddog_ffe_AttributePair attributes[] = { { .name = "country", diff --git a/tools/src/bin/ffi_test.rs b/tools/src/bin/ffi_test.rs index a935e36bce..fc1ade2344 100644 --- a/tools/src/bin/ffi_test.rs +++ b/tools/src/bin/ffi_test.rs @@ -229,7 +229,7 @@ fn expected_failures() -> &'static HashMap<&'static str, &'static str> { } // Test data directories to symlink into work directory -const TEST_DATA_PATHS: &[&str] = &["datadog-ffe/tests/data"]; +const TEST_DATA_PATHS: &[&str] = &["datadog-ffe/ffe-system-test-data"]; /// Run a command with output streamed to terminal fn run_passthrough(cmd: &mut Command, what: &str) -> Result<()> { From 2c1a5e0151b6e52f08194ac853e4cffbc950a31b Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Tue, 12 May 2026 23:09:19 -0400 Subject: [PATCH 4/8] Resolve FFE fixture paths from package root --- datadog-ffe/benches/eval.rs | 13 +++++++++++-- datadog-ffe/src/rules_based/eval/eval_assignment.rs | 13 +++++++++++-- datadog-ffe/src/rules_based/ufc/models.rs | 6 +++++- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/datadog-ffe/benches/eval.rs b/datadog-ffe/benches/eval.rs index 2af6f432db..ac6b8fb3a7 100644 --- a/datadog-ffe/benches/eval.rs +++ b/datadog-ffe/benches/eval.rs @@ -10,8 +10,17 @@ use datadog_ffe::rules_based::{ UniversalFlagConfig, }; +const UFC_CONFIG_PATH: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/ffe-system-test-data/ufc-config.json" +); +const EVALUATION_CASES_DIR: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/ffe-system-test-data/evaluation-cases" +); + fn load_configuration_bytes() -> Vec { - fs::read("ffe-system-test-data/ufc-config.json").expect("Failed to read ufc-config.json") + fs::read(UFC_CONFIG_PATH).expect("Failed to read ufc-config.json") } #[derive(Debug, Serialize, Deserialize)] @@ -33,7 +42,7 @@ struct TestResult { fn load_test_cases() -> Vec { let mut test_cases = Vec::new(); - if let Ok(entries) = fs::read_dir("ffe-system-test-data/evaluation-cases") { + if let Ok(entries) = fs::read_dir(EVALUATION_CASES_DIR) { for entry in entries.flatten() { if let Some(path_str) = entry.path().to_str() { if path_str.ends_with(".json") { diff --git a/datadog-ffe/src/rules_based/eval/eval_assignment.rs b/datadog-ffe/src/rules_based/eval/eval_assignment.rs index 80646c9e10..c2961da71f 100644 --- a/datadog-ffe/src/rules_based/eval/eval_assignment.rs +++ b/datadog-ffe/src/rules_based/eval/eval_assignment.rs @@ -257,13 +257,22 @@ mod tests { let _ = env_logger::builder().is_test(true).try_init(); let config = UniversalFlagConfig::from_json( - std::fs::read("ffe-system-test-data/ufc-config.json").unwrap(), + std::fs::read(concat!( + env!("CARGO_MANIFEST_DIR"), + "/ffe-system-test-data/ufc-config.json" + )) + .unwrap(), ) .unwrap(); let config = Configuration::from_server_response(config); let now = Utc::now(); - for entry in fs::read_dir("ffe-system-test-data/evaluation-cases/").unwrap() { + for entry in fs::read_dir(concat!( + env!("CARGO_MANIFEST_DIR"), + "/ffe-system-test-data/evaluation-cases/" + )) + .unwrap() + { let entry = entry.unwrap(); println!("Processing test file: {:?}", entry.path()); diff --git a/datadog-ffe/src/rules_based/ufc/models.rs b/datadog-ffe/src/rules_based/ufc/models.rs index 014c998bd5..6437d523a7 100644 --- a/datadog-ffe/src/rules_based/ufc/models.rs +++ b/datadog-ffe/src/rules_based/ufc/models.rs @@ -561,7 +561,11 @@ mod tests { #[test] #[cfg_attr(miri, ignore)] // this test is way too slow on miri fn parse_flags_v1() { - let json_content = std::fs::read_to_string("ffe-system-test-data/ufc-config.json").unwrap(); + let json_content = std::fs::read_to_string(concat!( + env!("CARGO_MANIFEST_DIR"), + "/ffe-system-test-data/ufc-config.json" + )) + .unwrap(); let ufc: UniversalFlagConfigWire = serde_json::from_str(&json_content).unwrap(); let failures = ufc From 247a5e05fba4c349c3c7ddd4a107591b5f0f4b33 Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Wed, 13 May 2026 11:17:01 -0400 Subject: [PATCH 5/8] test(ffe): stop asserting fixture reasons --- .../src/rules_based/eval/eval_assignment.rs | 28 +++---------------- .../rules_based/ufc/compiled_flag_config.rs | 3 -- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/datadog-ffe/src/rules_based/eval/eval_assignment.rs b/datadog-ffe/src/rules_based/eval/eval_assignment.rs index c2961da71f..8535091ac7 100644 --- a/datadog-ffe/src/rules_based/eval/eval_assignment.rs +++ b/datadog-ffe/src/rules_based/eval/eval_assignment.rs @@ -149,9 +149,9 @@ impl Allocation { }; // Determine the reason for assignment - let reason = if !self.rules.is_empty() { + let reason = if !self.rules.is_empty() || self.start_at.is_some() || self.end_at.is_some() { AssignmentReason::TargetingMatch - } else if self.splits.len() == 1 && !self.splits[0].had_shards { + } else if self.splits.len() == 1 && self.splits[0].shards.is_empty() { AssignmentReason::Static } else { AssignmentReason::Split @@ -212,8 +212,8 @@ mod tests { use crate::rules_based::{ eval::get_assignment, - ufc::{AssignmentReason, AssignmentValue, UniversalFlagConfig}, - Attribute, Configuration, EvaluationContext, EvaluationError, FlagType, Str, + ufc::{AssignmentValue, UniversalFlagConfig}, + Attribute, Configuration, EvaluationContext, FlagType, Str, }; #[derive(Debug, Serialize, Deserialize)] @@ -230,25 +230,6 @@ mod tests { #[derive(Debug, Serialize, Deserialize)] struct TestResult { value: Arc, - reason: Str, - } - - fn reason_name( - result: &Result, - ) -> &'static str { - match result { - Ok(assignment) => match assignment.reason { - AssignmentReason::TargetingMatch => "TARGETING_MATCH", - AssignmentReason::Split => "SPLIT", - AssignmentReason::Static => "STATIC", - }, - Err(EvaluationError::FlagDisabled) => "DISABLED", - Err( - EvaluationError::DefaultAllocationNull - | EvaluationError::FlagUnrecognizedOrDisabled, - ) => "DEFAULT", - Err(_) => "ERROR", - } } #[test] @@ -307,7 +288,6 @@ mod tests { .unwrap(); assert_eq!(result_assingment, &expected_assignment); - assert_eq!(reason_name(&result), test_case.result.reason.as_str()); println!("ok"); } } diff --git a/datadog-ffe/src/rules_based/ufc/compiled_flag_config.rs b/datadog-ffe/src/rules_based/ufc/compiled_flag_config.rs index f838f67291..dc10920cbc 100644 --- a/datadog-ffe/src/rules_based/ufc/compiled_flag_config.rs +++ b/datadog-ffe/src/rules_based/ufc/compiled_flag_config.rs @@ -51,7 +51,6 @@ pub(crate) struct Allocation { #[derive(Debug)] pub(crate) struct Split { pub shards: Vec, - pub had_shards: bool, pub variation_key: Str, pub value: AssignmentValue, pub serial_id: Option, @@ -151,7 +150,6 @@ fn compile_split( split: SplitWire, variation_values: &HashMap, ) -> Result { - let had_shards = !split.shards.is_empty(); let shards = split .shards .into_iter() @@ -169,7 +167,6 @@ fn compile_split( Ok(Split { shards, - had_shards, variation_key: split.variation_key, value: result, serial_id: split.serial_id, From ef516b48884c38c3be6528cd4e0557852ce61636 Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Wed, 13 May 2026 11:22:01 -0400 Subject: [PATCH 6/8] test(ffe): update fixtures submodule to main --- datadog-ffe/ffe-system-test-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datadog-ffe/ffe-system-test-data b/datadog-ffe/ffe-system-test-data index 50cb302519..4446371bc1 160000 --- a/datadog-ffe/ffe-system-test-data +++ b/datadog-ffe/ffe-system-test-data @@ -1 +1 @@ -Subproject commit 50cb30251936b6ae6ad8477b75f9d618e1fdc2b5 +Subproject commit 4446371bc1ca52bd526356927ef42d380145b118 From 4aefcc6fc2025538d3751070aa9a0b83272f69ff Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Wed, 13 May 2026 11:44:43 -0400 Subject: [PATCH 7/8] ci(benchmarks): initialize submodules --- .gitlab/benchmarks.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index 617c6539cf..97badfc555 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -17,6 +17,29 @@ benchmarks: - export ARTIFACTS_DIR="$(pwd)/reports" && (mkdir "${ARTIFACTS_DIR}" || :) - git clone --branch libdatadog/benchmarks https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform /platform && cd /platform - ./steps/capture-hardware-software-info.sh + - | + SCRIPT_DIR="$(pwd)/steps" + source ./steps/config-benchmark-env.sh + + checkout_source_with_submodules() { + local repo_url=$1 + local dest=$2 + local target=$3 + + if [[ -d "${dest}" ]]; then + return + fi + + git clone "${repo_url}" "${dest}" + git -C "${dest}" checkout "${target}" + git -C "${dest}" submodule update --init --recursive + } + + checkout_source_with_submodules "${UPSTREAM_REPO_URL}" "${CANDIDATE_PATH}" "${CANDIDATE_IDENTIFIER}" + + # Refresh benchmark-platform's derived baseline after candidate checkout. + VERBOSE="true" source ./steps/config-benchmark-env.sh + checkout_source_with_submodules "${UPSTREAM_REPO_URL}" "${BASELINE_PATH}" "${BASELINE_IDENTIFIER}" - ./steps/run-benchmarks.sh - ./steps/analyze-results.sh - "./steps/upload-results-to-s3.sh || :" From dcf589dcefa3e4c81a6f0cf34575917c19119d1c Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Fri, 15 May 2026 11:47:37 -0400 Subject: [PATCH 8/8] test(ffe): isolate canonical fixture suite --- .github/CODEOWNERS | 1 + .gitmodules | 4 +- Cargo.lock | 14 ++- Cargo.toml | 1 + README.md | 8 ++ datadog-ffe-test-suite/Cargo.toml | 24 +++++ .../benches/eval.rs | 0 .../ffe-system-test-data | 0 datadog-ffe-test-suite/src/lib.rs | 4 + .../tests/canonical_fixtures.rs | 81 ++++++++++++++++ datadog-ffe/Cargo.toml | 9 -- .../src/rules_based/eval/eval_assignment.rs | 95 ------------------- datadog-ffe/src/rules_based/ufc/models.rs | 22 ----- examples/ffi/README.md | 2 +- examples/ffi/ffe.c | 2 +- tools/docker/Dockerfile.build | 1 + tools/src/bin/ffi_test.rs | 2 +- 17 files changed, 137 insertions(+), 133 deletions(-) create mode 100644 datadog-ffe-test-suite/Cargo.toml rename {datadog-ffe => datadog-ffe-test-suite}/benches/eval.rs (100%) rename {datadog-ffe => datadog-ffe-test-suite}/ffe-system-test-data (100%) create mode 100644 datadog-ffe-test-suite/src/lib.rs create mode 100644 datadog-ffe-test-suite/tests/canonical_fixtures.rs diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index db05069dda..24e34b41e2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -26,6 +26,7 @@ cmake/ @DataDog/apm-common-components-core CONTRIBUTING.md @DataDog/libdatadog-core Cross.toml @DataDog/apm-common-components-core datadog-ffe @DataDog/feature-flagging-and-experimentation-sdk +datadog-ffe-test-suite @DataDog/feature-flagging-and-experimentation-sdk datadog-ffe-ffi @DataDog/feature-flagging-and-experimentation-sdk datadog-ipc*/ @DataDog/libdatadog-php datadog-live-debugger*/ @DataDog/libdatadog-php @DataDog/libdatadog-apm diff --git a/.gitmodules b/.gitmodules index c2e5b238b4..a8cca2c615 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "datadog-ffe/ffe-system-test-data"] - path = datadog-ffe/ffe-system-test-data +[submodule "datadog-ffe-test-suite/ffe-system-test-data"] + path = datadog-ffe-test-suite/ffe-system-test-data url = https://github.com/DataDog/ffe-system-test-data.git diff --git a/Cargo.lock b/Cargo.lock index 054a28ce73..1819871b65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1354,9 +1354,7 @@ name = "datadog-ffe" version = "1.0.0" dependencies = [ "chrono", - "criterion", "derive_more", - "env_logger", "faststr", "libdd-common", "log", @@ -1382,6 +1380,18 @@ dependencies = [ "libdd-common-ffi", ] +[[package]] +name = "datadog-ffe-test-suite" +version = "33.0.0" +dependencies = [ + "chrono", + "criterion", + "datadog-ffe", + "env_logger", + "serde", + "serde_json", +] + [[package]] name = "datadog-ipc" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 327fa9fa5d..074f8217dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ members = [ "libdd-crashtracker", "libdd-crashtracker-ffi", "datadog-ffe", + "datadog-ffe-test-suite", "datadog-ffe-ffi", "datadog-ipc", "datadog-ipc-macros", diff --git a/README.md b/README.md index 1b912d9cbc..514976cc9c 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,14 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md). Build `libdatadog` as usual with `cargo build`. +This repository uses git submodules for shared test data. If tests that depend +on fixture data fail because files are missing, initialize submodules from the +repository root: + +```bash +git submodule update --init --recursive +``` + #### Builder crate You can generate a release using the builder crate. This will trigger all the necessary steps to create the libraries, binaries, headers and package config files needed to use a pre-built libdatadog binary in a (non-rust) project. diff --git a/datadog-ffe-test-suite/Cargo.toml b/datadog-ffe-test-suite/Cargo.toml new file mode 100644 index 0000000000..3ab4adb0c7 --- /dev/null +++ b/datadog-ffe-test-suite/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "datadog-ffe-test-suite" +version.workspace = true +rust-version.workspace = true +edition.workspace = true +license.workspace = true +autobenches = false +publish = false + +[lib] +bench = false + +[dev-dependencies] +datadog-ffe = { path = "../datadog-ffe" } +chrono = { version = "0.4.38", default-features = false, features = ["now", "serde"] } +criterion = { version = "0.5", features = ["html_reports"] } +env_logger = "0.10" +serde = { version = "1.0", default-features = false, features = ["derive", "rc"] } +serde_json = { version = "1.0", default-features = false, features = ["std", "raw_value"] } + +[[bench]] +name = "ffe-eval" +harness = false +path = "benches/eval.rs" diff --git a/datadog-ffe/benches/eval.rs b/datadog-ffe-test-suite/benches/eval.rs similarity index 100% rename from datadog-ffe/benches/eval.rs rename to datadog-ffe-test-suite/benches/eval.rs diff --git a/datadog-ffe/ffe-system-test-data b/datadog-ffe-test-suite/ffe-system-test-data similarity index 100% rename from datadog-ffe/ffe-system-test-data rename to datadog-ffe-test-suite/ffe-system-test-data diff --git a/datadog-ffe-test-suite/src/lib.rs b/datadog-ffe-test-suite/src/lib.rs new file mode 100644 index 0000000000..2ce2db3384 --- /dev/null +++ b/datadog-ffe-test-suite/src/lib.rs @@ -0,0 +1,4 @@ +// Copyright 2026-Present Datadog, Inc. https://www.datadoghq.com/ +// SPDX-License-Identifier: Apache-2.0 + +//! Internal test-suite crate for datadog-ffe. diff --git a/datadog-ffe-test-suite/tests/canonical_fixtures.rs b/datadog-ffe-test-suite/tests/canonical_fixtures.rs new file mode 100644 index 0000000000..c504a3f1e9 --- /dev/null +++ b/datadog-ffe-test-suite/tests/canonical_fixtures.rs @@ -0,0 +1,81 @@ +// Copyright 2026-Present Datadog, Inc. https://www.datadoghq.com/ +// SPDX-License-Identifier: Apache-2.0 + +use std::{collections::HashMap, fs, path::PathBuf, sync::Arc}; + +use chrono::Utc; +use datadog_ffe::rules_based::{ + get_assignment, Attribute, Configuration, EvaluationContext, FlagType, Str, UniversalFlagConfig, +}; +use serde::Deserialize; + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +struct TestCase { + flag: String, + variation_type: FlagType, + default_value: serde_json::Value, + targeting_key: Option, + attributes: Arc>, + result: TestResult, +} + +#[derive(Debug, Deserialize)] +struct TestResult { + value: serde_json::Value, +} + +fn fixture_root() -> PathBuf { + PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("ffe-system-test-data") +} + +#[test] +#[cfg_attr(miri, ignore)] // this test is too slow on miri +fn evaluates_canonical_json_fixtures() { + let _ = env_logger::builder().is_test(true).try_init(); + + let root = fixture_root(); + let config_path = root.join("ufc-config.json"); + let cases_dir = root.join("evaluation-cases"); + + let config = UniversalFlagConfig::from_json(fs::read(&config_path).unwrap()).unwrap(); + let config = Configuration::from_server_response(config); + let now = Utc::now(); + + let mut fixture_count = 0; + for entry in fs::read_dir(&cases_dir).unwrap() { + let path = entry.unwrap().path(); + if path.extension().and_then(|ext| ext.to_str()) != Some("json") { + continue; + } + + fixture_count += 1; + let test_cases: Vec = serde_json::from_reader(fs::File::open(&path).unwrap()) + .unwrap_or_else(|err| panic!("failed to parse fixture {}: {err}", path.display())); + + for test_case in test_cases { + let subject = EvaluationContext::new(test_case.targeting_key, test_case.attributes); + let result = get_assignment( + Some(&config), + &test_case.flag, + &subject, + test_case.variation_type.into(), + now, + ); + + let actual = result + .map(|assignment| assignment.value.variation_value()) + .unwrap_or(test_case.default_value); + + assert_eq!( + actual, + test_case.result.value, + "unexpected value for flag {} in {}", + test_case.flag, + path.display() + ); + } + } + + assert!(fixture_count > 0, "no canonical FFE fixtures loaded"); +} diff --git a/datadog-ffe/Cargo.toml b/datadog-ffe/Cargo.toml index 30dcad9231..5432ad4a89 100644 --- a/datadog-ffe/Cargo.toml +++ b/datadog-ffe/Cargo.toml @@ -26,14 +26,5 @@ thiserror = { version = "2.0.3", default-features = false } url = { version = "2.5.0", default-features = false, features = ["std"] } pyo3 = { version = "0.28", optional = true, default-features = false, features = ["macros"] } -[dev-dependencies] -env_logger = "0.10" -criterion = { version = "0.5", features = ["html_reports"] } - -[[bench]] -name = "ffe-eval" -harness = false -path = "benches/eval.rs" - [features] pyo3 = ["dep:pyo3"] diff --git a/datadog-ffe/src/rules_based/eval/eval_assignment.rs b/datadog-ffe/src/rules_based/eval/eval_assignment.rs index 8535091ac7..8d5adcdc62 100644 --- a/datadog-ffe/src/rules_based/eval/eval_assignment.rs +++ b/datadog-ffe/src/rules_based/eval/eval_assignment.rs @@ -198,98 +198,3 @@ impl Shard { self.ranges.iter().any(|range| range.contains(h)) } } - -#[cfg(test)] -mod tests { - use std::{ - collections::HashMap, - fs::{self, File}, - sync::Arc, - }; - - use chrono::Utc; - use serde::{Deserialize, Serialize}; - - use crate::rules_based::{ - eval::get_assignment, - ufc::{AssignmentValue, UniversalFlagConfig}, - Attribute, Configuration, EvaluationContext, FlagType, Str, - }; - - #[derive(Debug, Serialize, Deserialize)] - #[serde(rename_all = "camelCase")] - struct TestCase { - flag: String, - variation_type: FlagType, - default_value: Arc, - targeting_key: Option, - attributes: Arc>, - result: TestResult, - } - - #[derive(Debug, Serialize, Deserialize)] - struct TestResult { - value: Arc, - } - - #[test] - #[cfg_attr(miri, ignore)] // this test is way too slow on miri - fn evaluation_sdk_test_data() { - let _ = env_logger::builder().is_test(true).try_init(); - - let config = UniversalFlagConfig::from_json( - std::fs::read(concat!( - env!("CARGO_MANIFEST_DIR"), - "/ffe-system-test-data/ufc-config.json" - )) - .unwrap(), - ) - .unwrap(); - let config = Configuration::from_server_response(config); - let now = Utc::now(); - - for entry in fs::read_dir(concat!( - env!("CARGO_MANIFEST_DIR"), - "/ffe-system-test-data/evaluation-cases/" - )) - .unwrap() - { - let entry = entry.unwrap(); - println!("Processing test file: {:?}", entry.path()); - - let f = File::open(entry.path()).unwrap(); - let test_cases: Vec = serde_json::from_reader(f).unwrap(); - - for test_case in test_cases { - let default_assignment = AssignmentValue::from_wire( - test_case.variation_type.into(), - test_case.default_value, - ) - .unwrap(); - - print!("test subject {:?} ... ", test_case.targeting_key); - let subject = EvaluationContext::new(test_case.targeting_key, test_case.attributes); - let result = get_assignment( - Some(&config), - &test_case.flag, - &subject, - test_case.variation_type.into(), - now, - ); - - let result_assingment = result - .as_ref() - .map(|assignment| &assignment.value) - .unwrap_or(&default_assignment); - let expected_assignment = AssignmentValue::from_wire( - test_case.variation_type.into(), - test_case.result.value, - ) - .unwrap(); - - assert_eq!(result_assingment, &expected_assignment); - println!("ok"); - } - } - } -} diff --git a/datadog-ffe/src/rules_based/ufc/models.rs b/datadog-ffe/src/rules_based/ufc/models.rs index 6437d523a7..35592cca8a 100644 --- a/datadog-ffe/src/rules_based/ufc/models.rs +++ b/datadog-ffe/src/rules_based/ufc/models.rs @@ -558,28 +558,6 @@ impl ShardRange { mod tests { use super::{TryParse, UniversalFlagConfigWire}; - #[test] - #[cfg_attr(miri, ignore)] // this test is way too slow on miri - fn parse_flags_v1() { - let json_content = std::fs::read_to_string(concat!( - env!("CARGO_MANIFEST_DIR"), - "/ffe-system-test-data/ufc-config.json" - )) - .unwrap(); - let ufc: UniversalFlagConfigWire = serde_json::from_str(&json_content).unwrap(); - - let failures = ufc - .flags - .values() - .filter(|it| matches!(it, TryParse::ParseFailed(_))) - .count(); - assert!( - failures == 0, - "failed to parse {failures}/{} flags", - ufc.flags.len() - ); - } - #[test] fn parse_partially_if_unexpected() { let ufc: UniversalFlagConfigWire = serde_json::from_str( diff --git a/examples/ffi/README.md b/examples/ffi/README.md index 263c61498d..4c0de8f8c5 100644 --- a/examples/ffi/README.md +++ b/examples/ffi/README.md @@ -64,6 +64,6 @@ The build command creates executables in the `examples/ffi/build` folder: - **crashtracking**: This example may intentionally trigger a crash to test crash handling. Consider adding it to the skip list in `tools/src/bin/ffi_test.rs` if running it causes issues. -- Tests run in a temporary directory. Test data paths (like `datadog-ffe/ffe-system-test-data`) are +- Tests run in a temporary directory. Test data paths (like `datadog-ffe-test-suite/ffe-system-test-data`) are symlinked into the temp directory automatically. - Generated artifacts are listed at the end of the run and cleaned up unless `--keep-artifacts` is used. diff --git a/examples/ffi/ffe.c b/examples/ffi/ffe.c index cb3b6afcd2..d2b5a5dccd 100644 --- a/examples/ffi/ffe.c +++ b/examples/ffi/ffe.c @@ -190,7 +190,7 @@ int main(int argc, char* argv[]) { config_path = argv[1]; } else { // Default to the canonical FFE test data file - config_path = "./datadog-ffe/ffe-system-test-data/ufc-config.json"; + config_path = "./datadog-ffe-test-suite/ffe-system-test-data/ufc-config.json"; } printf("Step 1: Loading configuration from file...\n"); diff --git a/tools/docker/Dockerfile.build b/tools/docker/Dockerfile.build index 928f57df60..7020e5e0f0 100644 --- a/tools/docker/Dockerfile.build +++ b/tools/docker/Dockerfile.build @@ -124,6 +124,7 @@ COPY "bin_tests/preload/preload.c" "bin_tests/preload/" COPY "libdd-tinybytes/Cargo.toml" "libdd-tinybytes/" COPY "builder/Cargo.toml" "builder/" COPY "datadog-ffe/Cargo.toml" "datadog-ffe/" +COPY "datadog-ffe-test-suite/Cargo.toml" "datadog-ffe-test-suite/" COPY "datadog-ffe-ffi/Cargo.toml" "datadog-ffe-ffi/" COPY "libdd-otel-thread-ctx/Cargo.toml" "libdd-otel-thread-ctx/" COPY "libdd-otel-thread-ctx-ffi/Cargo.toml" "libdd-otel-thread-ctx-ffi/" diff --git a/tools/src/bin/ffi_test.rs b/tools/src/bin/ffi_test.rs index fc1ade2344..262101f433 100644 --- a/tools/src/bin/ffi_test.rs +++ b/tools/src/bin/ffi_test.rs @@ -229,7 +229,7 @@ fn expected_failures() -> &'static HashMap<&'static str, &'static str> { } // Test data directories to symlink into work directory -const TEST_DATA_PATHS: &[&str] = &["datadog-ffe/ffe-system-test-data"]; +const TEST_DATA_PATHS: &[&str] = &["datadog-ffe-test-suite/ffe-system-test-data"]; /// Run a command with output streamed to terminal fn run_passthrough(cmd: &mut Command, what: &str) -> Result<()> {