diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2022-10-09 23:02:54 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2022-11-01 22:36:45 +0100 |
commit | 32612cec8afcc20cf28f8f4c70e5477e902d2b9a (patch) | |
tree | 28decfcdf949e6cade236fe5628fb29226606b46 | |
parent | 62568248007f11e7120aa9340f6bf3bf85cbc1c9 (diff) |
(test) Stored set
-rw-r--r-- | storage.test | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/storage.test b/storage.test index 10f5d2c..12e267d 100644 --- a/storage.test +++ b/storage.test @@ -1,6 +1,9 @@ test: spawn on node1 as p1 + # Root finding + ############### + # Diamond history send to p1: "store rec" @@ -91,3 +94,59 @@ test: send to p1 "stored-roots $r2_2" expect from p1 /stored-roots $r2_2 $r2_1/ + + + # Set + ##### + + send to p1 "stored-set-add $r1" + expect from p1 /stored-set-add (blake2#[0-9a-f]*)/ capture s1 + send to p1 "stored-set-add $r2 $s1" + expect from p1 /stored-set-add (blake2#[0-9a-f]*)/ capture s2 + send to p1 "stored-set-add $r3 $s2" + expect from p1 /stored-set-add (blake2#[0-9a-f]*)/ capture s3 + send to p1 "stored-set-add $r4 $s3" + expect from p1 /stored-set-add (blake2#[0-9a-f]*)/ capture s4 + + send to p1 "stored-set-list $s1" + expect from p1: + /stored-set-item $r1/ + /stored-set-(.*)/ capture done1 + guard done1 == "done" + + send to p1 "stored-set-list $s2" + expect from p1: + /stored-set-item $r2/ + /stored-set-(.*)/ capture done2 + guard done2 == "done" + + send to p1 "stored-set-list $s3" + expect from p1: + /stored-set-item $r2 $r3/ + /stored-set-(.*)/ capture done3 + guard done3 == "done" + + send to p1 "stored-set-list $s4" + expect from p1: + /stored-set-item $r4/ + /stored-set-(.*)/ capture done4 + guard done4 == "done" + + + send to p1 "stored-set-add $r2_2 $s4" + expect from p1 /stored-set-add (blake2#[0-9a-f]*)/ capture s5 + send to p1 "stored-set-add $r2_3 $s5" + expect from p1 /stored-set-add (blake2#[0-9a-f]*)/ capture s6 + + send to p1 "stored-set-list $s5" + expect from p1: + /stored-set-item $r4/ + /stored-set-item $r2_2/ + /stored-set-(.*)/ capture done5 + guard done5 == "done" + + send to p1 "stored-set-list $s6" + expect from p1: + /stored-set-item $r2_3/ + /stored-set-(.*)/ capture done6 + guard done6 == "done" |