summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network.test41
-rw-r--r--storage.test22
2 files changed, 63 insertions, 0 deletions
diff --git a/network.test b/network.test
index efd508f..6f16f7d 100644
--- a/network.test
+++ b/network.test
@@ -380,3 +380,44 @@ test Reconnection:
guard (done == "done")
expect /test-message-received blob [0-9]+ $message/
+
+
+test SendUnknownObjectType:
+ let refpat = /blake2#[0-9a-f]*/
+
+ spawn as p1
+ spawn as p2
+
+ with p1:
+ send "create-identity Device1"
+ send "start-server"
+ with p2:
+ send "create-identity Device2"
+ send "start-server"
+
+ expect from p1:
+ /peer 1 addr ${p2.node.ip} 29665/
+ /peer 1 id Device2/
+ expect from p2:
+ /peer 1 addr ${p1.node.ip} 29665/
+ /peer 1 id Device1/
+
+ with p1:
+ send:
+ "store test-unknown"
+ "TEST"
+ ""
+ expect /store-done ($refpat)/ capture r1
+
+ send "test-message-send 1 $r1"
+ expect /test-message-send done/
+
+ with p2:
+ expect /test-message-received test-unknown [0-9]+ $r1/
+
+ send "load $r1"
+ expect /load-type test-unknown 5/
+ expect /load-line TEST/
+ local:
+ expect /load-(.*)/ capture done
+ guard (done == "done")
diff --git a/storage.test b/storage.test
index 3d898b1..2a53bb8 100644
--- a/storage.test
+++ b/storage.test
@@ -474,3 +474,25 @@ test LocalStateKeepUnknown:
local:
expect /load-(.*)/ capture done
guard (done == "done")
+
+
+test UnknownObjectType:
+ let refpat = /blake2#[0-9a-f]*/
+
+ spawn as p
+ spawn as p2 on p.node
+
+ with p:
+ send:
+ "store test-unknown"
+ "TEST"
+ ""
+ expect /store-done ($refpat)/ capture r1
+
+ with p2:
+ send "load $r1"
+ expect /load-type test-unknown 5/
+ expect /load-line TEST/
+ local:
+ expect /load-(.*)/ capture done
+ guard (done == "done")