Skip to content

Commit 8ecbcd1

Browse files
authored
create v4 test datafile (#114)
1 parent 146d6c3 commit 8ecbcd1

File tree

2 files changed

+351
-0
lines changed

2 files changed

+351
-0
lines changed

core-api/src/test/java/com/optimizely/ab/config/ProjectConfigTestUtils.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ private static ProjectConfig generateNoAudienceProjectConfigV3() {
377377
events, Collections.<Audience>emptyList(), true, Collections.<LiveVariable>emptyList());
378378
}
379379

380+
private static final ProjectConfig VALID_PROJECT_CONFIG_V4 = generateValidProjectConfigV4();
381+
private static ProjectConfig generateValidProjectConfigV4() {
382+
return null;
383+
}
384+
380385
private ProjectConfigTestUtils() { }
381386

382387
public static String validConfigJsonV2() throws IOException {
@@ -423,6 +428,10 @@ public static ProjectConfig noAudienceProjectConfigV3() {
423428
return NO_AUDIENCE_PROJECT_CONFIG_V3;
424429
}
425430

431+
public static ProjectConfig validProjectConfigV4() {
432+
return VALID_PROJECT_CONFIG_V4;
433+
}
434+
426435
/**
427436
* Asserts that the provided project configs are equivalent.
428437
*/
Lines changed: 342 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,342 @@
1+
{
2+
"accountId": "2360254204",
3+
"anonymizeIP": true,
4+
"projectId": "3918735994",
5+
"revision": "1480511547",
6+
"version": "4",
7+
"audiences": [
8+
{
9+
"id": "3468206642",
10+
"name": "Gryffindors",
11+
"conditions": "[\"and\", [\"or\", [\"or\", {\"name\": \"house\", \"type\": \"custom_dimension\", \"value\":\"Gryffindor\"}]]]"
12+
}
13+
],
14+
"attributes": [
15+
{
16+
"id": "334265546",
17+
"key": "Gryffindor"
18+
}
19+
],
20+
"events": [],
21+
"groups": [
22+
{
23+
"id": "1015968292",
24+
"policy": "random",
25+
"trafficAllocation": [
26+
{
27+
"entityId": "2738374745",
28+
"endOfRange": 5000
29+
},
30+
{
31+
"entityId": "3042640549",
32+
"endOfRange": 10000
33+
}
34+
]
35+
}
36+
],
37+
"features": [
38+
{
39+
"id": "4195505407",
40+
"key": "boolean_feature",
41+
"layerId": "",
42+
"experimentIds": [],
43+
"variables": []
44+
},
45+
{
46+
"id": "3926744821",
47+
"key": "double_single_variable_feature",
48+
"layerId": "",
49+
"experimentIds": [],
50+
"variables": [
51+
{
52+
"id": "4111654444",
53+
"key": "double_variable",
54+
"type": "double",
55+
"defaultValue": "14.99"
56+
}
57+
]
58+
},
59+
{
60+
"id": "3281420120",
61+
"key": "integer_single_variable_feature",
62+
"layerId": "",
63+
"experimentIds": [],
64+
"variables": [
65+
{
66+
"id": "593964691",
67+
"key": "integer_variable",
68+
"type": "integer",
69+
"defaultValue": "7"
70+
}
71+
]
72+
},
73+
{
74+
"id": "2591051011",
75+
"key": "boolean_single_variable_feature",
76+
"layerId": "",
77+
"experimentIds": [],
78+
"variables": [
79+
{
80+
"id": "3974680341",
81+
"key": "boolean_variable",
82+
"type": "boolean",
83+
"defaultValue": "true"
84+
}
85+
]
86+
},
87+
{
88+
"id": "2079378557",
89+
"key": "string_single_variable_feature",
90+
"layerId": "",
91+
"experimentIds": [],
92+
"variables": [
93+
{
94+
"id": "2077511132",
95+
"key": "string_variable",
96+
"type": "string",
97+
"defaultValue": "wingardium leviosa"
98+
}
99+
]
100+
},
101+
{
102+
"id": "3263342226",
103+
"key": "multi_variate_feature",
104+
"layerId": "",
105+
"experimentIds": [],
106+
"variables": [
107+
{
108+
"id": "675244127",
109+
"key": "first_letter",
110+
"type": "string",
111+
"defaultValue": "H"
112+
},
113+
{
114+
"id": "4052219963",
115+
"key": "rest_of_name",
116+
"type": "string",
117+
"defaultValue": "arry"
118+
}
119+
]
120+
}
121+
],
122+
"layers": [
123+
{
124+
"id": "1630555626",
125+
"policy": "single_experiment",
126+
"experiments": [
127+
{
128+
"id": "1323241596",
129+
"key": "basic_experiment",
130+
"status": "Running",
131+
"variations": [
132+
{
133+
"id": "1423767502",
134+
"key": "A",
135+
"variables": []
136+
},
137+
{
138+
"id": "3433458314",
139+
"key": "B",
140+
"variables": []
141+
}
142+
],
143+
"trafficAllocation": [
144+
{
145+
"entityId": "1423767502",
146+
"endOfRange": 5000
147+
},
148+
{
149+
"entityId": "3433458314",
150+
"endOfRange": 10000
151+
}
152+
],
153+
"audienceIds": [
154+
"3468206642"
155+
],
156+
"forcedVariations": {
157+
"Harry Potter": "A",
158+
"Tom Riddle": "B"
159+
}
160+
}
161+
]
162+
},
163+
{
164+
"id": "3301900159",
165+
"policy": "single_experiment",
166+
"experiments": [
167+
{
168+
"id": "2738374745",
169+
"key": "first_grouped_experiment",
170+
"status": "Running",
171+
"groupId": "1015968292",
172+
"variations": [
173+
{
174+
"id": "2377378132",
175+
"key": "A",
176+
"variables": []
177+
},
178+
{
179+
"id": "1179171250",
180+
"key": "B",
181+
"variables": []
182+
}
183+
],
184+
"trafficAllocation": [
185+
{
186+
"entityId": "2377378132",
187+
"endOfRange": 5000
188+
},
189+
{
190+
"entityId": "1179171250",
191+
"endOfRange": 10000
192+
}
193+
],
194+
"audienceIds": [
195+
"3468206642"
196+
],
197+
"forcedVariations": {
198+
"Harry Potter": "A",
199+
"Tom Riddle": "B"
200+
}
201+
}
202+
]
203+
},
204+
{
205+
"id": "2625300442",
206+
"policy": "single_experiment",
207+
"experiments": [
208+
{
209+
"id": "3042640549",
210+
"key": "second_grouped_experiment",
211+
"status": "Running",
212+
"groupId": "1015968292",
213+
"variations": [
214+
{
215+
"id": "1558539439",
216+
"key": "A",
217+
"variables": []
218+
},
219+
{
220+
"id": "2142748370",
221+
"key": "B",
222+
"variables": []
223+
}
224+
],
225+
"trafficAllocation": [
226+
{
227+
"entityId": "1558539439",
228+
"endOfRange": 5000
229+
},
230+
{
231+
"entityId": "2142748370",
232+
"endOfRange": 10000
233+
}
234+
],
235+
"audienceIds": [
236+
"3468206642"
237+
],
238+
"forcedVariations": {
239+
"Hermione Granger": "A",
240+
"Ronald Weasley": "B"
241+
}
242+
}
243+
]
244+
},
245+
{
246+
"id": "3780747876",
247+
"policy": "single_experiment",
248+
"experiments": [
249+
{
250+
"id": "3262035800",
251+
"key": "multivariate_experiment",
252+
"status": "Running",
253+
"variations": [
254+
{
255+
"id": "1880281238",
256+
"key": "Fred",
257+
"variables": [
258+
{
259+
"id": "675244127",
260+
"value": "F"
261+
},
262+
{
263+
"id": "4052219963",
264+
"value": "red"
265+
}
266+
]
267+
},
268+
{
269+
"id": "3631049532",
270+
"key": "Feorge",
271+
"variables": [
272+
{
273+
"id": "675244127",
274+
"value": "F"
275+
},
276+
{
277+
"id": "4052219963",
278+
"value": "eorge"
279+
}
280+
]
281+
},
282+
{
283+
"id": "4204375027",
284+
"key": "Gred",
285+
"variables": [
286+
{
287+
"id": "675244127",
288+
"value": "G"
289+
},
290+
{
291+
"id": "4052219963",
292+
"value": "red"
293+
}
294+
]
295+
},
296+
{
297+
"id": "2099211198",
298+
"key": "George",
299+
"variables": [
300+
{
301+
"id": "675244127",
302+
"value": "G"
303+
},
304+
{
305+
"id": "4052219963",
306+
"value": "eorge"
307+
}
308+
]
309+
}
310+
],
311+
"trafficAllocation": [
312+
{
313+
"entityId": "1880281238",
314+
"endOfRange": 2500
315+
},
316+
{
317+
"entityId": "3631049532",
318+
"endOfRange": 5000
319+
},
320+
{
321+
"entityId": "4204375027",
322+
"endOfRange": 7500
323+
},
324+
{
325+
"entityId": "2099211198",
326+
"endOfRange": 10000
327+
}
328+
],
329+
"audienceIds": [
330+
"3468206642"
331+
],
332+
"forcedVariations": {
333+
"Fred": "Fred",
334+
"Feorge": "Feorge",
335+
"Gred": "Gred",
336+
"George": "George"
337+
}
338+
}
339+
]
340+
}
341+
]
342+
}

0 commit comments

Comments
 (0)