diff --git a/packages/node-server/src/configuration/ufc-v1.ts b/packages/node-server/src/configuration/ufc-v1.ts index abc9b09..27f104c 100644 --- a/packages/node-server/src/configuration/ufc-v1.ts +++ b/packages/node-server/src/configuration/ufc-v1.ts @@ -43,6 +43,7 @@ export interface Flag { } export interface UniversalFlagConfigurationV1 { + id: string createdAt: string format: string environment: { @@ -51,14 +52,6 @@ export interface UniversalFlagConfigurationV1 { flags: Record } -export interface UniversalFlagConfigurationV1Response { - data: { - type: 'universal-flag-configuration' - id: string - attributes: UniversalFlagConfigurationV1 - } -} - export function variantTypeToFlagValueType(variantType: VariantType): FlagValueType { if (variantType === 'BOOLEAN') { return 'boolean' diff --git a/packages/node-server/test/data/flags-v1.json b/packages/node-server/test/data/flags-v1.json index 8c7c1c2..627bfb1 100644 --- a/packages/node-server/test/data/flags-v1.json +++ b/packages/node-server/test/data/flags-v1.json @@ -1,2898 +1,3070 @@ { - "data": { - "type": "universal-flag-configuration", - "id": "1", - "attributes": { - "createdAt": "2024-04-17T19:40:53.716Z", - "format": "SERVER", - "environment": { - "name": "Test" + "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" } + } }, - "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": [] + }, + "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": [] } - }, - "allocations": [ + ], + "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": [ { - "key": "rollout", - "splits": [ + "conditions": [ { - "variationKey": "pi", - "shards": [] + "attribute": "email", + "operator": "MATCHES", + "value": "@example\\.com" } - ], - "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" + ] + } + ], + "splits": [ + { + "variationKey": "partial-example", + "shards": [] } - }, - "allocations": [ + ], + "doLog": true + }, + { + "key": "test", + "rules": [ { - "key": "partial-example", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "email", - "operator": "MATCHES", - "value": "@example\\.com" - } - ] + "attribute": "email", + "operator": "MATCHES", + "value": ".*@test\\.com" } - ], - "splits": [ + ] + } + ], + "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": [ { - "variationKey": "partial-example", - "shards": [] + "attribute": "number", + "operator": "ONE_OF", + "value": ["1"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "1", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "2-for-123456789", + "rules": [ { - "key": "test", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "email", - "operator": "MATCHES", - "value": ".*@test\\.com" - } - ] + "attribute": "number", + "operator": "ONE_OF", + "value": ["123456789"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "2", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "3-for-not-2", + "rules": [ + { + "conditions": [ { - "variationKey": "test", - "shards": [] + "attribute": "number", + "operator": "NOT_ONE_OF", + "value": ["2"] } - ], - "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": [ + ], + "splits": [ { - "key": "1-for-1", - "rules": [ + "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": [ { - "conditions": [ - { - "attribute": "number", - "operator": "ONE_OF", - "value": ["1"] - } - ] + "attribute": "one_of_flag", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "1", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "2-for-matches", + "rules": [ + { + "conditions": [ { - "variationKey": "1", - "shards": [] + "attribute": "matches_flag", + "operator": "MATCHES", + "value": "true" } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "2", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "3-for-not-one-of", + "rules": [ { - "key": "2-for-123456789", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "number", - "operator": "ONE_OF", - "value": ["123456789"] - } - ] + "attribute": "not_one_of_flag", + "operator": "NOT_ONE_OF", + "value": ["false"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "3", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "4-for-not-matches", + "rules": [ + { + "conditions": [ { - "variationKey": "2", - "shards": [] + "attribute": "not_matches_flag", + "operator": "NOT_MATCHES", + "value": "false" } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "3-for-not-2", - "rules": [ + "variationKey": "4", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "5-for-matches-null", + "rules": [ + { + "conditions": [ { - "conditions": [ - { - "attribute": "number", - "operator": "NOT_ONE_OF", - "value": ["2"] - } - ] + "attribute": "null_flag", + "operator": "ONE_OF", + "value": ["null"] } - ], - "splits": [ + ] + } + ], + "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": [ { - "variationKey": "3", - "shards": [] + "attribute": "country", + "operator": "MATCHES", + "value": "US" } - ], - "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": [ + ], + "splits": [ { - "key": "1-for-one-of", - "rules": [ + "variationKey": "empty_string", + "shards": [ { - "conditions": [ + "salt": "allocation-empty-shards", + "totalShards": 10000, + "ranges": [ { - "attribute": "one_of_flag", - "operator": "ONE_OF", - "value": ["true"] + "start": 0, + "end": 10000 } ] } - ], - "splits": [ - { - "variationKey": "1", - "shards": [] - } - ], - "doLog": true - }, + ] + } + ], + "doLog": true + }, + { + "key": "allocation-test", + "rules": [], + "splits": [ { - "key": "2-for-matches", - "rules": [ + "variationKey": "non_empty", + "shards": [ { - "conditions": [ + "salt": "allocation-empty-shards", + "totalShards": 10000, + "ranges": [ { - "attribute": "matches_flag", - "operator": "MATCHES", - "value": "true" + "start": 0, + "end": 10000 } ] } - ], - "splits": [ + ] + } + ], + "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": [ { - "variationKey": "2", - "shards": [] + "attribute": "country", + "operator": "ONE_OF", + "value": ["US", "Canada", "Mexico"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "3-for-not-one-of", - "rules": [ + "variationKey": "on", + "shards": [ { - "conditions": [ + "salt": "some-salt", + "totalShards": 10000, + "ranges": [ { - "attribute": "not_one_of_flag", - "operator": "NOT_ONE_OF", - "value": ["false"] + "start": 0, + "end": 10000 } ] } - ], - "splits": [ + ] + } + ], + "doLog": true + }, + { + "key": "on-for-age-50+", + "rules": [ + { + "conditions": [ { - "variationKey": "3", - "shards": [] + "attribute": "age", + "operator": "GTE", + "value": 50 } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "4-for-not-matches", - "rules": [ + "variationKey": "on", + "shards": [ { - "conditions": [ + "salt": "some-salt", + "totalShards": 10000, + "ranges": [ { - "attribute": "not_matches_flag", - "operator": "NOT_MATCHES", - "value": "false" + "start": 0, + "end": 10000 } ] } - ], - "splits": [ + ] + } + ], + "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": [ { - "variationKey": "4", - "shards": [] + "attribute": "size", + "operator": "LT", + "value": 10 } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "small", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "medum-size", + "rules": [ { - "key": "5-for-matches-null", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "null_flag", - "operator": "ONE_OF", - "value": ["null"] - } - ] + "attribute": "size", + "operator": "GTE", + "value": 10 + }, + { + "attribute": "size", + "operator": "LTE", + "value": 20 } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "medium", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "large-size", + "rules": [ + { + "conditions": [ { - "variationKey": "5", - "shards": [] + "attribute": "size", + "operator": "GT", + "value": 25 } - ], - "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": "" + ] + } + ], + "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 + } + ] }, - "non_empty": { - "key": "non_empty", - "value": "non_empty" + { + "conditions": [ + { + "attribute": "size", + "operator": "LT", + "value": 10 + } + ] + } + ], + "splits": [ + { + "variationKey": "old", + "shards": [] } - }, - "allocations": [ + ], + "doLog": true + }, + { + "key": "not-null-operator", + "rules": [ { - "key": "allocation-empty", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "country", - "operator": "MATCHES", - "value": "US" - } - ] + "attribute": "size", + "operator": "IS_NULL", + "value": false } - ], - "splits": [ + ] + } + ], + "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": [ { - "variationKey": "empty_string", - "shards": [ + "attribute": "country", + "operator": "NOT_ONE_OF", + "value": ["US", "Canada", "Mexico"] + } + ] + } + ], + "splits": [ + { + "variationKey": "control", + "shards": [ + { + "salt": "traffic-new-user-onboarding-experiment", + "totalShards": 10000, + "ranges": [ { - "salt": "allocation-empty-shards", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] + "start": 0, + "end": 6000 } ] - } - ], - "doLog": true - }, - { - "key": "allocation-test", - "rules": [], - "splits": [ + }, { - "variationKey": "non_empty", - "shards": [ + "salt": "split-new-user-onboarding-experiment", + "totalShards": 10000, + "ranges": [ { - "salt": "allocation-empty-shards", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] + "start": 0, + "end": 5000 } ] } - ], - "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": [ + "variationKey": "red", + "shards": [ { - "conditions": [ + "salt": "traffic-new-user-onboarding-experiment", + "totalShards": 10000, + "ranges": [ { - "attribute": "country", - "operator": "ONE_OF", - "value": ["US", "Canada", "Mexico"] + "start": 0, + "end": 6000 } ] - } - ], - "splits": [ + }, { - "variationKey": "on", - "shards": [ + "salt": "split-new-user-onboarding-experiment", + "totalShards": 10000, + "ranges": [ { - "salt": "some-salt", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] + "start": 5000, + "end": 8000 } ] } - ], - "doLog": true + ] }, { - "key": "on-for-age-50+", - "rules": [ + "variationKey": "yellow", + "shards": [ { - "conditions": [ + "salt": "traffic-new-user-onboarding-experiment", + "totalShards": 10000, + "ranges": [ { - "attribute": "age", - "operator": "GTE", - "value": 50 + "start": 0, + "end": 6000 } ] - } - ], - "splits": [ + }, { - "variationKey": "on", - "shards": [ + "salt": "split-new-user-onboarding-experiment", + "totalShards": 10000, + "ranges": [ { - "salt": "some-salt", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] + "start": 8000, + "end": 10000 } ] } - ], - "doLog": true - }, + ] + } + ], + "doLog": true + }, + { + "key": "rollout", + "rules": [ { - "key": "off-for-all", - "rules": [], - "splits": [ + "conditions": [ { - "variationKey": "off", - "shards": [] + "attribute": "country", + "operator": "ONE_OF", + "value": ["US", "Canada", "Mexico"] } - ], - "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": [ + ], + "splits": [ { - "key": "small-size", - "rules": [ + "variationKey": "blue", + "shards": [ { - "conditions": [ + "salt": "split-new-user-onboarding-rollout", + "totalShards": 10000, + "ranges": [ { - "attribute": "size", - "operator": "LT", - "value": 10 + "start": 0, + "end": 8000 } ] } ], - "splits": [ + "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": [ { - "variationKey": "small", - "shards": [] + "attribute": "country", + "operator": "ONE_OF", + "value": ["US", "Canada", "Mexico"] } - ], - "doLog": true + ] }, { - "key": "medum-size", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "size", - "operator": "GTE", - "value": 10 - }, + "attribute": "email", + "operator": "MATCHES", + "value": ".*@example.com" + } + ] + } + ], + "splits": [ + { + "variationKey": "three", + "shards": [ + { + "salt": "full-range-salt", + "totalShards": 10000, + "ranges": [ { - "attribute": "size", - "operator": "LTE", - "value": 20 + "start": 0, + "end": 10000 } ] } - ], - "splits": [ - { - "variationKey": "medium", - "shards": [] - } - ], - "doLog": true - }, + ] + } + ], + "doLog": true + }, + { + "key": "50/50 split", + "rules": [], + "splits": [ { - "key": "large-size", - "rules": [ + "variationKey": "one", + "shards": [ { - "conditions": [ + "salt": "split-numeric-flag-some-allocation", + "totalShards": 10000, + "ranges": [ { - "attribute": "size", - "operator": "GT", - "value": 25 + "start": 0, + "end": 5000 } ] } - ], - "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": "two", + "shards": [ { - "variationKey": "old", - "shards": [] + "salt": "split-numeric-flag-some-allocation", + "totalShards": 10000, + "ranges": [ + { + "start": 5000, + "end": 10000 + } + ] } - ], - "endAt": "2002-10-31T09:00:00.594Z", - "doLog": true - }, + ] + } + ], + "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": [ { - "key": "future-versions", - "splits": [ + "conditions": [ { - "variationKey": "new", - "shards": [] + "attribute": "Force Empty", + "operator": "ONE_OF", + "value": ["true"] } - ], - "startAt": "2052-10-31T09:00:00.594Z", - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "current-versions", - "splits": [ + "variationKey": "empty", + "shards": [ { - "variationKey": "current", - "shards": [] + "salt": "full-range-salt", + "totalShards": 10000, + "ranges": [ + { + "start": 0, + "end": 10000 + } + ] } - ], - "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": [ + ], + "doLog": true + }, + { + "key": "50/50 split", + "rules": [], + "splits": [ { - "key": "null-operator", - "rules": [ + "variationKey": "one", + "shards": [ { - "conditions": [ + "salt": "traffic-json-flag", + "totalShards": 10000, + "ranges": [ { - "attribute": "size", - "operator": "IS_NULL", - "value": true + "start": 0, + "end": 10000 } ] }, { - "conditions": [ + "salt": "split-json-flag", + "totalShards": 10000, + "ranges": [ { - "attribute": "size", - "operator": "LT", - "value": 10 + "start": 0, + "end": 5000 } ] } - ], - "splits": [ - { - "variationKey": "old", - "shards": [] - } - ], - "doLog": true + ] }, { - "key": "not-null-operator", - "rules": [ + "variationKey": "two", + "shards": [ { - "conditions": [ + "salt": "traffic-json-flag", + "totalShards": 10000, + "ranges": [ { - "attribute": "size", - "operator": "IS_NULL", - "value": false + "start": 0, + "end": 10000 } ] - } - ], - "splits": [ + }, { - "variationKey": "new", - "shards": [] + "salt": "split-json-flag", + "totalShards": 10000, + "ranges": [ + { + "start": 5000, + "end": 10000 + } + ] } - ], - "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": [ + ], + "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": [ { - "key": "id rule", - "rules": [ + "variationKey": "de", + "shards": [ { - "conditions": [ + "salt": "split-json-flag", + "totalShards": 10000, + "ranges": [ { - "attribute": "id", - "operator": "MATCHES", - "value": "zach" + "start": 0, + "end": 2500 } ] } - ], - "splits": [ - { - "variationKey": "purple", - "shards": [] - } - ], - "doLog": false + ] }, { - "key": "internal users", - "rules": [ + "variationKey": "ua", + "shards": [ { - "conditions": [ + "salt": "split-json-flag", + "totalShards": 10000, + "ranges": [ { - "attribute": "email", - "operator": "MATCHES", - "value": "@mycompany.com" + "start": 2500, + "end": 5000 } ] } - ], - "splits": [ - { - "variationKey": "green", - "shards": [] - } - ], - "doLog": false + ] }, { - "key": "experiment", - "rules": [ + "variationKey": "zh", + "shards": [ { - "conditions": [ + "salt": "split-json-flag", + "totalShards": 10000, + "ranges": [ { - "attribute": "country", - "operator": "NOT_ONE_OF", - "value": ["US", "Canada", "Mexico"] + "start": 5000, + "end": 7500 } ] } - ], - "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": "emoji", + "shards": [ { - "variationKey": "yellow", - "shards": [ + "salt": "split-json-flag", + "totalShards": 10000, + "ranges": [ { - "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 - } - ] + "start": 7500, + "end": 10000 } ] } - ], - "doLog": true - }, + ] + } + ], + "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": [ { - "key": "rollout", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "country", - "operator": "ONE_OF", - "value": ["US", "Canada", "Mexico"] - } - ] + "attribute": "string_with_spaces", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_spaces", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_space", + "rules": [ + { + "conditions": [ { - "variationKey": "blue", - "shards": [ - { - "salt": "split-new-user-onboarding-rollout", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 8000 - } - ] - } - ], - "extraLogging": { - "allocationvalue_type": "rollout", - "owner": "hippo" - } + "attribute": "string_with_only_one_space", + "operator": "ONE_OF", + "value": ["true"] } - ], - "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 + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_space", + "shards": [] } - }, - "allocations": [ + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_spaces", + "rules": [ { - "key": "targeted allocation", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "country", - "operator": "ONE_OF", - "value": ["US", "Canada", "Mexico"] - } - ] - }, + "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": [ { - "conditions": [ - { - "attribute": "email", - "operator": "MATCHES", - "value": ".*@example.com" - } - ] + "attribute": "string_with_dots", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_dots", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_dot", + "rules": [ + { + "conditions": [ { - "variationKey": "three", - "shards": [ - { - "salt": "full-range-salt", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - } - ] + "attribute": "string_with_only_one_dot", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_dot", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_dots", + "rules": [ { - "key": "50/50 split", - "rules": [], - "splits": [ + "conditions": [ { - "variationKey": "one", - "shards": [ - { - "salt": "split-numeric-flag-some-allocation", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 5000 - } - ] - } - ] - }, + "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": [ { - "variationKey": "two", - "shards": [ - { - "salt": "split-numeric-flag-some-allocation", - "totalShards": 10000, - "ranges": [ - { - "start": 5000, - "end": 10000 - } - ] - } - ] + "attribute": "string_with_comas", + "operator": "ONE_OF", + "value": ["true"] } - ], - "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": [ + ], + "splits": [ { - "key": "Optionally Force Empty", - "rules": [ + "variationKey": "string_with_comas", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_coma", + "rules": [ + { + "conditions": [ { - "conditions": [ - { - "attribute": "Force Empty", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_coma", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_coma", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_comas", + "rules": [ + { + "conditions": [ { - "variationKey": "empty", - "shards": [ - { - "salt": "full-range-salt", - "totalShards": 10000, - "ranges": [ - { - "start": 0, - "end": 10000 - } - ] - } - ] + "attribute": "string_with_only_multiple_comas", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_comas", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_colons", + "rules": [ { - "key": "50/50 split", - "rules": [], - "splits": [ + "conditions": [ { - "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 - } - ] - } - ] - }, + "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": [ { - "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 - } - ] - } - ] + "attribute": "string_with_only_one_colon", + "operator": "ONE_OF", + "value": ["true"] } - ], - "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": [ + ], + "splits": [ { - "key": "allocation-test", - "splits": [ + "variationKey": "string_with_only_one_colon", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_colons", + "rules": [ + { + "conditions": [ { - "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": [] + "attribute": "string_with_only_multiple_colons", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "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 - }, + "variationKey": "string_with_only_multiple_colons", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_semicolons", + "rules": [ { - "key": "allocation-test-string_with_only_multiple_dollar_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_multiple_dollar_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] - } - ], - "splits": [ + "conditions": [ { - "variationKey": "string_with_only_multiple_dollar_signs", - "shards": [] + "attribute": "string_with_semicolons", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "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 - }, + "variationKey": "string_with_semicolons", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_semicolon", + "rules": [ { - "key": "allocation-test-string_with_only_one_at_sign", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_only_one_at_sign", - "operator": "ONE_OF", - "value": ["true"] - } - ] - } - ], - "splits": [ + "conditions": [ { - "variationKey": "string_with_only_one_at_sign", - "shards": [] + "attribute": "string_with_only_one_semicolon", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "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 - }, + "variationKey": "string_with_only_one_semicolon", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_semicolons", + "rules": [ { - "key": "allocation-test-string_with_amp_signs", - "rules": [ - { - "conditions": [ - { - "attribute": "string_with_amp_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] - } - ], - "splits": [ + "conditions": [ { - "variationKey": "string_with_amp_signs", - "shards": [] + "attribute": "string_with_only_multiple_semicolons", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "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_multiple_semicolons", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_slashes", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_amp_sign", - "shards": [] + "attribute": "string_with_slashes", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_slashes", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_slash", + "rules": [ { - "key": "allocation-test-string_with_only_multiple_amp_signs", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_amp_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_slash", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_slash", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_slashes", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_amp_signs", - "shards": [] + "attribute": "string_with_only_multiple_slashes", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_slashes", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_dashes", + "rules": [ { - "key": "allocation-test-string_with_hash_signs", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_hash_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_dashes", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_dashes", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_dash", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_hash_signs", - "shards": [] + "attribute": "string_with_only_one_dash", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_dash", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_dashes", + "rules": [ { - "key": "allocation-test-string_with_only_one_hash_sign", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_one_hash_sign", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_multiple_dashes", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_dashes", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_underscores", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_hash_sign", - "shards": [] + "attribute": "string_with_underscores", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "allocation-test-string_with_only_multiple_hash_signs", - "rules": [ + "variationKey": "string_with_underscores", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_underscore", + "rules": [ + { + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_hash_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_underscore", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_underscore", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_underscores", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_hash_signs", - "shards": [] + "attribute": "string_with_only_multiple_underscores", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_underscores", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_plus_signs", + "rules": [ { - "key": "allocation-test-string_with_percentage_signs", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_percentage_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_plus_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_plus_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_plus_sign", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_percentage_signs", - "shards": [] + "attribute": "string_with_only_one_plus_sign", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_plus_sign", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_plus_signs", + "rules": [ { - "key": "allocation-test-string_with_only_one_percentage_sign", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_one_percentage_sign", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_multiple_plus_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_plus_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_equal_signs", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_percentage_sign", - "shards": [] + "attribute": "string_with_equal_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_equal_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_equal_sign", + "rules": [ { - "key": "allocation-test-string_with_only_multiple_percentage_signs", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_percentage_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_equal_sign", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_equal_sign", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_equal_signs", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_percentage_signs", - "shards": [] + "attribute": "string_with_only_multiple_equal_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "allocation-test-string_with_tilde_signs", - "rules": [ + "variationKey": "string_with_only_multiple_equal_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_dollar_signs", + "rules": [ + { + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_tilde_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_dollar_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_dollar_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_dollar_sign", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_tilde_signs", - "shards": [] + "attribute": "string_with_only_one_dollar_sign", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_dollar_sign", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_dollar_signs", + "rules": [ { - "key": "allocation-test-string_with_only_one_tilde_sign", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_one_tilde_sign", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_multiple_dollar_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_dollar_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_at_signs", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_tilde_sign", - "shards": [] + "attribute": "string_with_at_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_at_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_at_sign", + "rules": [ { - "key": "allocation-test-string_with_only_multiple_tilde_signs", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_tilde_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_at_sign", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_at_sign", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_at_signs", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_tilde_signs", - "shards": [] + "attribute": "string_with_only_multiple_at_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_at_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_amp_signs", + "rules": [ { - "key": "allocation-test-string_with_asterix_signs", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_asterix_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_amp_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_amp_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_amp_sign", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_asterix_signs", - "shards": [] + "attribute": "string_with_only_one_amp_sign", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "allocation-test-string_with_only_one_asterix_sign", - "rules": [ + "variationKey": "string_with_only_one_amp_sign", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_amp_signs", + "rules": [ + { + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_one_asterix_sign", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_multiple_amp_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_amp_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_hash_signs", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_asterix_sign", - "shards": [] + "attribute": "string_with_hash_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_hash_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_hash_sign", + "rules": [ { - "key": "allocation-test-string_with_only_multiple_asterix_signs", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_asterix_signs", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_hash_sign", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_hash_sign", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_hash_signs", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_asterix_signs", - "shards": [] + "attribute": "string_with_only_multiple_hash_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_hash_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_percentage_signs", + "rules": [ { - "key": "allocation-test-string_with_single_quotes", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_single_quotes", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_percentage_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_percentage_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_percentage_sign", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_single_quotes", - "shards": [] + "attribute": "string_with_only_one_percentage_sign", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_percentage_sign", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_percentage_signs", + "rules": [ { - "key": "allocation-test-string_with_only_one_single_quote", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_one_single_quote", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_multiple_percentage_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_percentage_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_tilde_signs", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_single_quote", - "shards": [] + "attribute": "string_with_tilde_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "allocation-test-string_with_only_multiple_single_quotes", - "rules": [ + "variationKey": "string_with_tilde_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_tilde_sign", + "rules": [ + { + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_single_quotes", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_tilde_sign", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_tilde_sign", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_tilde_signs", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_single_quotes", - "shards": [] + "attribute": "string_with_only_multiple_tilde_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_tilde_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_asterix_signs", + "rules": [ { - "key": "allocation-test-string_with_question_marks", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_question_marks", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_asterix_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_asterix_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_asterix_sign", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_question_marks", - "shards": [] + "attribute": "string_with_only_one_asterix_sign", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_asterix_sign", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_asterix_signs", + "rules": [ { - "key": "allocation-test-string_with_only_one_question_mark", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_one_question_mark", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_multiple_asterix_signs", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_asterix_signs", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_single_quotes", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_question_mark", - "shards": [] + "attribute": "string_with_single_quotes", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_single_quotes", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_single_quote", + "rules": [ { - "key": "allocation-test-string_with_only_multiple_question_marks", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_question_marks", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_single_quote", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_single_quote", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_single_quotes", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_question_marks", - "shards": [] + "attribute": "string_with_only_multiple_single_quotes", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "allocation-test-string_with_exclamation_marks", - "rules": [ + "variationKey": "string_with_only_multiple_single_quotes", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_question_marks", + "rules": [ + { + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_exclamation_marks", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_question_marks", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_question_marks", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_question_mark", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_exclamation_marks", - "shards": [] + "attribute": "string_with_only_one_question_mark", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_question_mark", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_question_marks", + "rules": [ { - "key": "allocation-test-string_with_only_one_exclamation_mark", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_one_exclamation_mark", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_multiple_question_marks", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_question_marks", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_exclamation_marks", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_exclamation_mark", - "shards": [] + "attribute": "string_with_exclamation_marks", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_exclamation_marks", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_exclamation_mark", + "rules": [ { - "key": "allocation-test-string_with_only_multiple_exclamation_marks", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_exclamation_marks", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_exclamation_mark", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_exclamation_mark", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_exclamation_marks", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_exclamation_marks", - "shards": [] + "attribute": "string_with_only_multiple_exclamation_marks", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_exclamation_marks", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_opening_parentheses", + "rules": [ { - "key": "allocation-test-string_with_opening_parentheses", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_opening_parentheses", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_opening_parentheses", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_opening_parentheses", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_opening_parenthese", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_opening_parentheses", - "shards": [] + "attribute": "string_with_only_one_opening_parenthese", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ { - "key": "allocation-test-string_with_only_one_opening_parenthese", - "rules": [ + "variationKey": "string_with_only_one_opening_parenthese", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_opening_parentheses", + "rules": [ + { + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_one_opening_parenthese", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_multiple_opening_parentheses", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_opening_parentheses", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_closing_parentheses", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_opening_parenthese", - "shards": [] + "attribute": "string_with_closing_parentheses", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_closing_parentheses", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_one_closing_parenthese", + "rules": [ { - "key": "allocation-test-string_with_only_multiple_opening_parentheses", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_opening_parentheses", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "string_with_only_one_closing_parenthese", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_one_closing_parenthese", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "allocation-test-string_with_only_multiple_closing_parentheses", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_opening_parentheses", - "shards": [] + "attribute": "string_with_only_multiple_closing_parentheses", + "operator": "ONE_OF", + "value": ["true"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "string_with_only_multiple_closing_parentheses", + "shards": [] + } + ], + "doLog": true + } + ] + }, + "boolean-false-assignment": { + "key": "boolean-false-assignment", + "enabled": true, + "variationType": "BOOLEAN", + "variations": { + "false-variation": { + "key": "false-variation", + "value": false + }, + "true-variation": { + "key": "true-variation", + "value": true + } + }, + "allocations": [ + { + "key": "disable-feature", + "rules": [ { - "key": "allocation-test-string_with_closing_parentheses", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_closing_parentheses", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "should_disable_feature", + "operator": "ONE_OF", + "value": ["true"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "false-variation", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "enable-feature", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_closing_parentheses", - "shards": [] + "attribute": "should_disable_feature", + "operator": "ONE_OF", + "value": ["false"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "true-variation", + "shards": [] + } + ], + "doLog": true + } + ] + }, + "empty-string-variation": { + "key": "empty-string-variation", + "enabled": true, + "variationType": "STRING", + "variations": { + "empty-content": { + "key": "empty-content", + "value": "" + }, + "detailed-content": { + "key": "detailed-content", + "value": "detailed_content" + } + }, + "allocations": [ + { + "key": "minimal-content", + "rules": [ { - "key": "allocation-test-string_with_only_one_closing_parenthese", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_one_closing_parenthese", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "content_type", + "operator": "ONE_OF", + "value": ["minimal"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "empty-content", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "full-content", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_one_closing_parenthese", - "shards": [] + "attribute": "content_type", + "operator": "ONE_OF", + "value": ["full"] } - ], - "doLog": true - }, + ] + } + ], + "splits": [ + { + "variationKey": "detailed-content", + "shards": [] + } + ], + "doLog": true + } + ] + }, + "falsy-value-assignments": { + "key": "falsy-value-assignments", + "enabled": true, + "variationType": "INTEGER", + "variations": { + "zero-limit": { + "key": "zero-limit", + "value": 0 + }, + "premium-limit": { + "key": "premium-limit", + "value": 100 + } + }, + "allocations": [ + { + "key": "free-tier-limit", + "rules": [ { - "key": "allocation-test-string_with_only_multiple_closing_parentheses", - "rules": [ + "conditions": [ { - "conditions": [ - { - "attribute": "string_with_only_multiple_closing_parentheses", - "operator": "ONE_OF", - "value": ["true"] - } - ] + "attribute": "plan_tier", + "operator": "ONE_OF", + "value": ["free"] } - ], - "splits": [ + ] + } + ], + "splits": [ + { + "variationKey": "zero-limit", + "shards": [] + } + ], + "doLog": true + }, + { + "key": "premium-tier-limit", + "rules": [ + { + "conditions": [ { - "variationKey": "string_with_only_multiple_closing_parentheses", - "shards": [] + "attribute": "plan_tier", + "operator": "ONE_OF", + "value": ["premium"] } - ], - "doLog": true + ] + } + ], + "splits": [ + { + "variationKey": "premium-limit", + "shards": [] } - ] + ], + "doLog": true } - } + ] } } } diff --git a/packages/node-server/test/data/tests/test-case-boolean-false-assignment.json b/packages/node-server/test/data/tests/test-case-boolean-false-assignment.json new file mode 100644 index 0000000..03553f4 --- /dev/null +++ b/packages/node-server/test/data/tests/test-case-boolean-false-assignment.json @@ -0,0 +1,50 @@ +[ + { + "flag": "boolean-false-assignment", + "variationType": "BOOLEAN", + "defaultValue": true, + "targetingKey": "alice", + "attributes": { + "should_disable_feature": true + }, + "result": { + "value": false, + "variant": "false-variation", + "flagMetadata": { + "allocationKey": "disable-feature", + "variationType": "boolean", + "doLog": true + } + } + }, + { + "flag": "boolean-false-assignment", + "variationType": "BOOLEAN", + "defaultValue": true, + "targetingKey": "bob", + "attributes": { + "should_disable_feature": false + }, + "result": { + "value": true, + "variant": "true-variation", + "flagMetadata": { + "allocationKey": "enable-feature", + "variationType": "boolean", + "doLog": true + } + } + }, + { + "flag": "boolean-false-assignment", + "variationType": "BOOLEAN", + "defaultValue": true, + "targetingKey": "charlie", + "attributes": { + "unknown_attribute": "value" + }, + "result": { + "value": true + } + } +] \ No newline at end of file diff --git a/packages/node-server/test/data/tests/test-case-empty-string-variation.json b/packages/node-server/test/data/tests/test-case-empty-string-variation.json new file mode 100644 index 0000000..2b2480d --- /dev/null +++ b/packages/node-server/test/data/tests/test-case-empty-string-variation.json @@ -0,0 +1,50 @@ +[ + { + "flag": "empty-string-variation", + "variationType": "STRING", + "defaultValue": "default_value", + "targetingKey": "empty_user", + "attributes": { + "content_type": "minimal" + }, + "result": { + "value": "", + "variant": "empty-content", + "flagMetadata": { + "allocationKey": "minimal-content", + "variationType": "string", + "doLog": true + } + } + }, + { + "flag": "empty-string-variation", + "variationType": "STRING", + "defaultValue": "default_value", + "targetingKey": "full_user", + "attributes": { + "content_type": "full" + }, + "result": { + "value": "detailed_content", + "variant": "detailed-content", + "flagMetadata": { + "allocationKey": "full-content", + "variationType": "string", + "doLog": true + } + } + }, + { + "flag": "empty-string-variation", + "variationType": "STRING", + "defaultValue": "default_value", + "targetingKey": "default_user", + "attributes": { + "content_type": "unknown" + }, + "result": { + "value": "default_value" + } + } +] \ No newline at end of file diff --git a/packages/node-server/test/data/tests/test-case-falsy-value-assignments.json b/packages/node-server/test/data/tests/test-case-falsy-value-assignments.json new file mode 100644 index 0000000..47662a0 --- /dev/null +++ b/packages/node-server/test/data/tests/test-case-falsy-value-assignments.json @@ -0,0 +1,50 @@ +[ + { + "flag": "falsy-value-assignments", + "variationType": "INTEGER", + "defaultValue": 999, + "targetingKey": "zero_user", + "attributes": { + "plan_tier": "free" + }, + "result": { + "value": 0, + "variant": "zero-limit", + "flagMetadata": { + "allocationKey": "free-tier-limit", + "variationType": "number", + "doLog": true + } + } + }, + { + "flag": "falsy-value-assignments", + "variationType": "INTEGER", + "defaultValue": 999, + "targetingKey": "premium_user", + "attributes": { + "plan_tier": "premium" + }, + "result": { + "value": 100, + "variant": "premium-limit", + "flagMetadata": { + "allocationKey": "premium-tier-limit", + "variationType": "number", + "doLog": true + } + } + }, + { + "flag": "falsy-value-assignments", + "variationType": "INTEGER", + "defaultValue": 999, + "targetingKey": "unknown_user", + "attributes": { + "plan_tier": "trial" + }, + "result": { + "value": 999 + } + } +] \ No newline at end of file diff --git a/packages/node-server/test/flags-v1.spec.ts b/packages/node-server/test/flags-v1.spec.ts index 7ef2196..74ae4c4 100644 --- a/packages/node-server/test/flags-v1.spec.ts +++ b/packages/node-server/test/flags-v1.spec.ts @@ -4,7 +4,7 @@ import path from 'node:path' import type { ExposureEvent } from '@datadog/flagging-core' import type { EvaluationContext, EvaluationDetails, FlagValue, JsonValue, Logger } from '@openfeature/core' import { OpenFeature } from '@openfeature/server-sdk' -import type { UniversalFlagConfigurationV1, UniversalFlagConfigurationV1Response } from '../src/configuration/ufc-v1' +import type { UniversalFlagConfigurationV1 } from '../src/configuration/ufc-v1' import { DatadogNodeServerProvider } from '../src/provider' import type { TestCase } from './TestCaseResult.types' @@ -35,8 +35,8 @@ describe('Universal Flag Configuration V1', () => { const getUFC = (): UniversalFlagConfigurationV1 => { const ufcJson = fs.readFileSync(path.join(__dirname, './data', 'flags-v1.json'), 'utf8') - const ufcResponse = JSON.parse(ufcJson) as UniversalFlagConfigurationV1Response - return ufcResponse.data.attributes + const ufcResponse = JSON.parse(ufcJson) as UniversalFlagConfigurationV1 + return ufcResponse } const getTestCaseFileNames = (): string[] => { diff --git a/packages/node-server/test/provider.spec.ts b/packages/node-server/test/provider.spec.ts index 053c2c9..48bccb8 100644 --- a/packages/node-server/test/provider.spec.ts +++ b/packages/node-server/test/provider.spec.ts @@ -12,7 +12,7 @@ import { OpenFeature, ProviderEvents, } from '@openfeature/server-sdk' -import type { UniversalFlagConfigurationV1, UniversalFlagConfigurationV1Response } from 'src/configuration/ufc-v1' +import type { UniversalFlagConfigurationV1 } from 'src/configuration/ufc-v1' import { DatadogNodeServerProvider } from '../src/provider' describe('DatadogNodeServerProvider', () => { @@ -31,8 +31,8 @@ describe('DatadogNodeServerProvider', () => { const configuration = ((): UniversalFlagConfigurationV1 => { const ufcJson = fs.readFileSync(path.join(__dirname, './data', 'flags-v1.json'), 'utf8') - const ufcResponse = JSON.parse(ufcJson) as UniversalFlagConfigurationV1Response - return ufcResponse.data.attributes + const ufcResponse = JSON.parse(ufcJson) as UniversalFlagConfigurationV1 + return ufcResponse })() beforeEach(() => {