summaryrefslogtreecommitdiff
path: root/test/state.et
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-09-07 21:39:17 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-09-09 22:09:21 +0200
commit50e3f4e0cc313828aa6682ebd270e2abbfef422a (patch)
treeb682c84136dd2c54fab5be98227e8cd7359a1029 /test/state.et
parentded08b19077fb8b36ff3e3aba30cd3b1fda1e87b (diff)
Test: commands working with custom shared state
Diffstat (limited to 'test/state.et')
-rw-r--r--test/state.et26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/state.et b/test/state.et
new file mode 100644
index 0000000..ab8703d
--- /dev/null
+++ b/test/state.et
@@ -0,0 +1,26 @@
+module state
+
+import common
+
+test SharedStateLocal:
+ spawn as p
+ with p:
+ send "create-identity Device Owner"
+ expect /create-identity-done ref $refpat extref ($refpat).*/ capture device
+ send "identity-info $device"
+ expect /identity-info ref $device base $refpat owner ($refpat).*/ capture owner
+
+ send "shared-state-val-get 0c6c1fe0-f2d7-4891-926b-c332449f7871"
+ expect /shared-state-val-get 0c6c1fe0-f2d7-4891-926b-c332449f7871 $owner/
+
+ for i in [ 1 .. 10 ]:
+ send:
+ "store rec"
+ "i:i $i"
+ ""
+ expect /store-done ($refpat)/ capture r
+
+ send "shared-state-val-set ffffffff-0000-0000-0000-000000000001 $r"
+
+ send "shared-state-val-get ffffffff-0000-0000-0000-000000000001"
+ expect /shared-state-val-get ffffffff-0000-0000-0000-000000000001 $r/