Commit 9d48d28
committed
Add test case for OF.7: empty targeting key is valid
OF.7 specifies that empty string shall be accepted as a targeting key
and evaluation should proceed as normal.
Changes:
- Added test case in DDEvaluatorTest for empty targeting key
- Modified TestCase utility to use a custom EvaluationContext wrapper
that preserves empty targeting keys (OpenFeature SDK's MutableContext
converts empty string to null, which breaks OF.7 compliance)1 parent ebf18b1 commit 9d48d28
2 files changed
Lines changed: 47 additions & 8 deletions
File tree
- products/feature-flagging/api/src/test/java/datadog/trace/api/openfeature
- util
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
216 | 221 | | |
217 | 222 | | |
218 | 223 | | |
| |||
Lines changed: 42 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
19 | 51 | | |
20 | 52 | | |
21 | 53 | | |
| |||
28 | 60 | | |
29 | 61 | | |
30 | 62 | | |
31 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
32 | 66 | | |
33 | 67 | | |
34 | 68 | | |
35 | 69 | | |
36 | | - | |
| 70 | + | |
37 | 71 | | |
38 | 72 | | |
39 | 73 | | |
40 | 74 | | |
41 | | - | |
| 75 | + | |
42 | 76 | | |
43 | 77 | | |
44 | 78 | | |
45 | 79 | | |
46 | | - | |
| 80 | + | |
47 | 81 | | |
48 | 82 | | |
49 | 83 | | |
50 | 84 | | |
51 | | - | |
| 85 | + | |
52 | 86 | | |
53 | 87 | | |
54 | 88 | | |
55 | 89 | | |
56 | | - | |
| 90 | + | |
57 | 91 | | |
58 | 92 | | |
59 | 93 | | |
60 | 94 | | |
61 | | - | |
| 95 | + | |
62 | 96 | | |
63 | 97 | | |
64 | 98 | | |
| |||
0 commit comments