Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAustin Schaffer <austin.schaffer@ryansg.com>2020-01-14 13:01:17 -0500
committerAustin Schaffer <austin.schaffer@ryansg.com>2020-01-15 10:26:07 -0500
commit61b66c24a3a535ece0e26afc7a7cbe5fa22cfcd0 (patch)
tree4040b54ed2fcca543abffd922cfb9a856cd14568 /test
parent103c06da3938a78a1badc35a051fad4998ac7274 (diff)
downloadliza-61b66c24a3a535ece0e26afc7a7cbe5fa22cfcd0.tar.gz
liza-61b66c24a3a535ece0e26afc7a7cbe5fa22cfcd0.tar.bz2
liza-61b66c24a3a535ece0e26afc7a7cbe5fa22cfcd0.zip
[DEV-6730] Store concluding_save with the reverse delta
Diffstat (limited to 'test')
-rw-r--r--test/server/service/RatingServiceTest.ts1
-rw-r--r--test/system/DeltaProcessorTest.ts21
-rw-r--r--test/system/V1MessageWriterTest.ts30
3 files changed, 29 insertions, 23 deletions
diff --git a/test/server/service/RatingServiceTest.ts b/test/server/service/RatingServiceTest.ts
index 546118c..016d75f 100644
--- a/test/server/service/RatingServiceTest.ts
+++ b/test/server/service/RatingServiceTest.ts
@@ -468,6 +468,7 @@ function getStubs()
data: {
_unavailable_all: [ undefined ]
},
+ concluding_save: false,
timestamp: 123
}
};
diff --git a/test/system/DeltaProcessorTest.ts b/test/system/DeltaProcessorTest.ts
index e4a54d4..485af31 100644
--- a/test/system/DeltaProcessorTest.ts
+++ b/test/system/DeltaProcessorTest.ts
@@ -459,9 +459,10 @@ describe( 'system.DeltaProcessor', () =>
rdelta: {
data: [
{
- data: { foo: [ 'first_bar' ] },
- timestamp: <UnixTimestamp>123123,
- type: 'data',
+ data: { foo: [ 'first_bar' ] },
+ timestamp: <UnixTimestamp>123123,
+ type: 'data',
+ concluding_save: false,
}
],
ratedata: [],
@@ -583,9 +584,10 @@ describe( 'system.DeltaProcessor', () =>
rdelta: {
data: [
{
- data: { foo: [ 'first_bar' ] },
- timestamp: <UnixTimestamp>123123,
- type: 'data',
+ data: { foo: [ 'first_bar' ] },
+ timestamp: <UnixTimestamp>123123,
+ type: 'data',
+ concluding_save: false,
}
],
ratedata: [],
@@ -603,9 +605,10 @@ describe( 'system.DeltaProcessor', () =>
rdelta: {
data: [
{
- data: { foo: [ 'first_bar' ] },
- timestamp: <UnixTimestamp>123123,
- type: 'data',
+ data: { foo: [ 'first_bar' ] },
+ timestamp: <UnixTimestamp>123123,
+ type: 'data',
+ concluding_save: false,
}
],
ratedata: [],
diff --git a/test/system/V1MessageWriterTest.ts b/test/system/V1MessageWriterTest.ts
index 2debf9d..210fd22 100644
--- a/test/system/V1MessageWriterTest.ts
+++ b/test/system/V1MessageWriterTest.ts
@@ -189,17 +189,12 @@ describe( 'system.V1MessageWriter', () =>
if ( valid )
{
- // return expect( result ).to.eventually.deep.equal(
- // Buffer.from( '' )
- // )
- // .then( b =>
- // {
- // expect( typeof(b) ).to.equal( 'object' );
- // } );
- return result.catch( e =>
+ return expect( result ).to.eventually.deep.equal(
+ Buffer.from( '' )
+ )
+ .then( b =>
{
- console.log( 'avroerror: ', e );
- expect.fail();
+ expect( typeof(b) ).to.equal( 'object' );
} );
}
else
@@ -396,9 +391,10 @@ describe( 'system.V1MessageWriter', () =>
};
const delta = <Delta<any>>{
- type: <DeltaType>'data',
- timestamp: <UnixTimestamp>123123123,
- data: <DeltaResult<any>>{},
+ type: <DeltaType>'data',
+ timestamp: <UnixTimestamp>123123123,
+ data: <DeltaResult<any>>{},
+ concluding_save: true,
};
const expected = {
@@ -406,7 +402,13 @@ describe( 'system.V1MessageWriter', () =>
id: 'STEP_SAVE',
ts: ts * 1000,
actor: 'SERVER',
- step: null,
+ step: {
+ EventStep: {
+ transition: 'END',
+ src: '',
+ dest: '',
+ },
+ },
},
document: {
id: doc_id,