Skip to content

Commit

Permalink
FF-2526 fix tests for assignmentDetails object (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
greghuels authored Jul 1, 2024
1 parent ae3daf7 commit e169514
Show file tree
Hide file tree
Showing 15 changed files with 134 additions and 402 deletions.
64 changes: 16 additions & 48 deletions ufc/tests/test-case-boolean-one-of-matches.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"assignment": 1,
"assignmentDetails": {
"value": 1,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"1-for-one-of\".",
"variationKey": "1",
Expand Down Expand Up @@ -72,9 +70,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down Expand Up @@ -124,9 +120,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down Expand Up @@ -176,9 +170,7 @@
"assignment": 2,
"assignmentDetails": {
"value": 2,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"2-for-matches\".",
"variationKey": "2",
Expand Down Expand Up @@ -236,9 +228,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down Expand Up @@ -288,9 +278,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down Expand Up @@ -340,9 +328,7 @@
"assignment": 4,
"assignmentDetails": {
"value": 4,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"4-for-not-matches\".",
"variationKey": "4",
Expand Down Expand Up @@ -400,9 +386,7 @@
"assignment": 4,
"assignmentDetails": {
"value": 4,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"4-for-not-matches\".",
"variationKey": "4",
Expand Down Expand Up @@ -460,9 +444,7 @@
"assignment": 3,
"assignmentDetails": {
"value": 3,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"3-for-not-one-of\".",
"variationKey": "3",
Expand Down Expand Up @@ -522,9 +504,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down Expand Up @@ -574,9 +554,7 @@
"assignment": 3,
"assignmentDetails": {
"value": 3,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"3-for-not-one-of\".",
"variationKey": "3",
Expand Down Expand Up @@ -636,9 +614,7 @@
"assignment": 3,
"assignmentDetails": {
"value": 3,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"3-for-not-one-of\".",
"variationKey": "3",
Expand Down Expand Up @@ -698,9 +674,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down Expand Up @@ -750,9 +724,7 @@
"assignment": 5,
"assignmentDetails": {
"value": 5,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"5-for-matches-null\".",
"variationKey": "5",
Expand Down Expand Up @@ -811,9 +783,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down Expand Up @@ -861,9 +831,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down
20 changes: 5 additions & 15 deletions ufc/tests/test-case-comparator-operator-flag.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"assignment": "small",
"assignmentDetails": {
"value": "small",
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"small-size\".",
"variationKey": "small",
Expand Down Expand Up @@ -60,9 +58,7 @@
"assignment": "medium",
"assignmentDetails": {
"value": "medium",
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"medum-size\".",
"variationKey": "medium",
Expand Down Expand Up @@ -113,9 +109,7 @@
"assignment": "unknown",
"assignmentDetails": {
"value": "unknown",
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down Expand Up @@ -153,9 +147,7 @@
"assignment": "large",
"assignmentDetails": {
"value": "large",
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "MATCH",
"flagEvaluationDescription": "Supplied attributes match rules defined in allocation \"large-size\".",
"variationKey": "large",
Expand Down Expand Up @@ -200,9 +192,7 @@
"assignment": "unknown",
"assignmentDetails": {
"value": "unknown",
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down
12 changes: 3 additions & 9 deletions ufc/tests/test-case-disabled-flag.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "FLAG_UNRECOGNIZED_OR_DISABLED",
"flagEvaluationDescription": "Unrecognized or disabled flag: disabled_flag",
"variationKey": null,
Expand All @@ -34,9 +32,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "FLAG_UNRECOGNIZED_OR_DISABLED",
"flagEvaluationDescription": "Unrecognized or disabled flag: disabled_flag",
"variationKey": null,
Expand All @@ -55,9 +51,7 @@
"assignment": 0,
"assignmentDetails": {
"value": 0,
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "FLAG_UNRECOGNIZED_OR_DISABLED",
"flagEvaluationDescription": "Unrecognized or disabled flag: disabled_flag",
"variationKey": null,
Expand Down
12 changes: 3 additions & 9 deletions ufc/tests/test-case-empty-flag.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"assignment": "default_value",
"assignmentDetails": {
"value": "default_value",
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand All @@ -34,9 +32,7 @@
"assignment": "default_value",
"assignmentDetails": {
"value": "default_value",
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand All @@ -55,9 +51,7 @@
"assignment": "default_value",
"assignmentDetails": {
"value": "default_value",
"environment": {
"name": "Test"
},
"environmentName": "Test",
"flagEvaluationCode": "DEFAULT_ALLOCATION_NULL",
"flagEvaluationDescription": "No allocations matched. Falling back to \"Default Allocation\", serving NULL",
"variationKey": null,
Expand Down
Loading

0 comments on commit e169514

Please sign in to comment.