diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-02-23 22:21:51 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-02-23 22:21:51 +0100 |
commit | 4a84fdcc4d849fff733c6eb9a6e6ca97f84c1184 (patch) | |
tree | 3468114050df74b008cf013ecce7b317e1762348 | |
parent | bbefd6f0cbf4867af2e2e41e0719bf010bd16f2c (diff) |
(test) Test message service for sending arbitrary data
-rw-r--r-- | network.test (renamed from discovery.test) | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/discovery.test b/network.test index 2aaaf24..0b9fecb 100644 --- a/discovery.test +++ b/network.test @@ -1,4 +1,4 @@ -test: +test Discovery: spawn as p1 spawn as p2 send "create-identity Device1 Owner" to p1 @@ -117,3 +117,30 @@ test: /peer $peer6_4 id Device4/ /peer ([0-9]+) addr ${p5.node.ip} 29665/ capture peer6_5 /peer $peer6_5 id Device5/ + + +test LargeData: + spawn as p1 + spawn as p2 + send "create-identity Device1" to p1 + send "create-identity Device2" to p2 + send "start-server" to p1 + send "start-server" to p2 + 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/ + + for i in [0..1]: + with p1: + send "store blob" + for j in [1 .. i * 10]: + send "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789" + send "" + expect /store-done (blake2#[0-9a-f]*)/ capture ref + + send "test-message-send 1 $ref" + expect /test-message-send done/ + expect /test-message-received blob ${i*1000} $ref/ from p2 |