Skip to content

Commit a4d8d95

Browse files
Update feature flag definitions adding a flag with large segments, to assert that nothing breaks with default config
1 parent 79fdb4a commit a4d8d95

File tree

3 files changed

+77
-4
lines changed

3 files changed

+77
-4
lines changed

src/__tests__/browserSuites/telemetry.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default async function telemetryBrowserSuite(fetchMock, t) {
7676

7777
// @TODO check if iDe value is correct
7878
assert.deepEqual(data, {
79-
mE: {}, hE: { sp: { 500: 1 }, ms: { 500: 1 } }, tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 31, seC: 1, skC: 1, eQ: 1, eD: 0, sE: [], t: [], ufs: {}
79+
mE: {}, hE: { sp: { 500: 1 }, ms: { 500: 1 } }, tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 32, seC: 1, skC: 1, eQ: 1, eD: 0, sE: [], t: [], ufs: {}
8080
}, 'metrics/usage JSON payload should be the expected');
8181

8282
finish.next();
@@ -96,7 +96,7 @@ export default async function telemetryBrowserSuite(fetchMock, t) {
9696
// @TODO check if iDe value is correct
9797
assert.deepEqual(data, {
9898
mL: {}, mE: {}, hE: {}, hL: {}, // errors and latencies were popped
99-
tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 31, seC: 1, skC: 1, eQ: 1, eD: 0, sE: [], t: [], ufs: {}
99+
tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 32, seC: 1, skC: 1, eQ: 1, eD: 0, sE: [], t: [], ufs: {}
100100
}, '2nd metrics/usage JSON payload should be the expected');
101101
return 200;
102102
});

src/__tests__/mocks/splitchanges.since.-1.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,78 @@
11
{
22
"splits": [
3+
{
4+
"orgId": null,
5+
"environment": null,
6+
"trafficTypeId": null,
7+
"trafficTypeName": null,
8+
"name": "in_employees_large_segment",
9+
"seed": -1984784937,
10+
"status": "ACTIVE",
11+
"killed": false,
12+
"defaultTreatment": "no",
13+
"conditions": [
14+
{
15+
"matcherGroup": {
16+
"combiner": "AND",
17+
"matchers": [
18+
{
19+
"keySelector": null,
20+
"matcherType": "WHITELIST",
21+
"negate": false,
22+
"userDefinedSegmentMatcherData": null,
23+
"whitelistMatcherData": {
24+
"whitelist": [
25+
"tia@split.io",
26+
"trevor@split.io"
27+
]
28+
},
29+
"unaryNumericMatcherData": null,
30+
"betweenMatcherData": null
31+
}
32+
]
33+
},
34+
"partitions": [
35+
{
36+
"treatment": "yes",
37+
"size": 100
38+
}
39+
]
40+
},
41+
{
42+
"matcherGroup": {
43+
"combiner": "AND",
44+
"matchers": [
45+
{
46+
"keySelector": {
47+
"trafficType": "user",
48+
"attribute": null
49+
},
50+
"matcherType": "IN_LARGE_SEGMENT",
51+
"negate": false,
52+
"userDefinedSegmentMatcherData": {
53+
"segmentName": "employees"
54+
},
55+
"whitelistMatcherData": null,
56+
"unaryNumericMatcherData": null,
57+
"betweenMatcherData": null,
58+
"unaryStringMatcherData": null
59+
}
60+
]
61+
},
62+
"partitions": [
63+
{
64+
"treatment": "yes",
65+
"size": 0
66+
},
67+
{
68+
"treatment": "no",
69+
"size": 100
70+
}
71+
]
72+
}
73+
],
74+
"configurations": {}
75+
},
376
{
477
"orgId": null,
578
"environment": null,

src/__tests__/nodeSuites/telemetry.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default async function telemetryNodejsSuite(key, fetchMock, assert) {
6666

6767
// @TODO check if iDe value is correct
6868
assert.deepEqual(data, {
69-
mE: {}, hE: { sp: { 500: 1 } }, tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 31, seC: 3, skC: 3, eQ: 1, eD: 0, sE: [], t: [], ufs: {}
69+
mE: {}, hE: { sp: { 500: 1 } }, tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 32, seC: 3, skC: 3, eQ: 1, eD: 0, sE: [], t: [], ufs: {}
7070
}, 'metrics/usage JSON payload should be the expected');
7171

7272
finish.next();
@@ -85,7 +85,7 @@ export default async function telemetryNodejsSuite(key, fetchMock, assert) {
8585
// @TODO check if iDe value is correct
8686
assert.deepEqual(data, {
8787
mL: {}, mE: {}, hE: {}, hL: {}, // errors and latencies were popped
88-
tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 31, seC: 3, skC: 3, eQ: 1, eD: 0, sE: [], t: [], ufs: {}
88+
tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 32, seC: 3, skC: 3, eQ: 1, eD: 0, sE: [], t: [], ufs: {}
8989
}, '2nd metrics/usage JSON payload should be the expected');
9090
return 200;
9191
});

0 commit comments

Comments
 (0)