Skip to content

Commit 2acc81d

Browse files
committed
Fix checksum state tests
1 parent 7385e67 commit 2acc81d

File tree

1 file changed

+33
-9
lines changed

1 file changed

+33
-9
lines changed

packages/service-core/test/src/sync/BucketChecksumState.test.ts

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ bucket_definitions:
7777
syncContext,
7878
syncRequest,
7979
tokenPayload,
80-
syncRules: SYNC_RULES_GLOBAL,
80+
syncRules: {
81+
syncRules: SYNC_RULES_GLOBAL,
82+
version: 1
83+
},
8184
bucketStorage: storage
8285
});
8386

@@ -147,7 +150,10 @@ bucket_definitions:
147150
tokenPayload,
148151
// Client sets the initial state here
149152
syncRequest: { buckets: [{ name: 'global[]', after: '1' }] },
150-
syncRules: SYNC_RULES_GLOBAL,
153+
syncRules: {
154+
syncRules: SYNC_RULES_GLOBAL,
155+
version: 1
156+
},
151157
bucketStorage: storage
152158
});
153159

@@ -185,7 +191,10 @@ bucket_definitions:
185191
syncContext,
186192
tokenPayload,
187193
syncRequest,
188-
syncRules: SYNC_RULES_GLOBAL_TWO,
194+
syncRules: {
195+
syncRules: SYNC_RULES_GLOBAL_TWO,
196+
version: 2
197+
},
189198
bucketStorage: storage
190199
});
191200

@@ -253,7 +262,10 @@ bucket_definitions:
253262
tokenPayload,
254263
// Client sets the initial state here
255264
syncRequest: { buckets: [{ name: 'something_here[]', after: '1' }] },
256-
syncRules: SYNC_RULES_GLOBAL,
265+
syncRules: {
266+
syncRules: SYNC_RULES_GLOBAL,
267+
version: 1
268+
},
257269
bucketStorage: storage
258270
});
259271

@@ -294,7 +306,10 @@ bucket_definitions:
294306
syncContext,
295307
tokenPayload,
296308
syncRequest,
297-
syncRules: SYNC_RULES_GLOBAL_TWO,
309+
syncRules: {
310+
syncRules: SYNC_RULES_GLOBAL_TWO,
311+
version: 1
312+
},
298313
bucketStorage: storage
299314
});
300315

@@ -347,7 +362,10 @@ bucket_definitions:
347362
syncContext,
348363
tokenPayload,
349364
syncRequest,
350-
syncRules: SYNC_RULES_GLOBAL_TWO,
365+
syncRules: {
366+
syncRules: SYNC_RULES_GLOBAL_TWO,
367+
version: 2
368+
},
351369
bucketStorage: storage
352370
});
353371

@@ -402,7 +420,10 @@ bucket_definitions:
402420
syncContext,
403421
tokenPayload,
404422
syncRequest,
405-
syncRules: SYNC_RULES_GLOBAL_TWO,
423+
syncRules: {
424+
syncRules: SYNC_RULES_GLOBAL_TWO,
425+
version: 2
426+
},
406427
bucketStorage: storage
407428
});
408429

@@ -506,7 +527,10 @@ bucket_definitions:
506527
syncContext,
507528
tokenPayload: { sub: 'u1' },
508529
syncRequest,
509-
syncRules: SYNC_RULES_DYNAMIC,
530+
syncRules: {
531+
syncRules: SYNC_RULES_DYNAMIC,
532+
version: 1
533+
},
510534
bucketStorage: storage
511535
});
512536

@@ -629,7 +653,7 @@ config:
629653
syncContext,
630654
syncRequest,
631655
tokenPayload,
632-
syncRules: rules,
656+
syncRules: { syncRules: rules, version: 1 },
633657
bucketStorage: storage,
634658
...options
635659
});

0 commit comments

Comments
 (0)