mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-01 00:45:28 +00:00
expanded tests
This commit is contained in:
parent
bd848c73e2
commit
c88da2d363
33
tests/meshms
33
tests/meshms
@ -74,4 +74,37 @@ test_reflectedPly() {
|
||||
assertStdoutGrep --stdout --stderr --matches=1 '^1:.*:unacknowledged:meshms:Message-1'
|
||||
}
|
||||
|
||||
doc_reflectedPly="Sender == recipient works as expected"
|
||||
setup_reflectedPly() {
|
||||
setup
|
||||
}
|
||||
test_reflectedPly() {
|
||||
executeOk_servald meshms add message 12345 67890 $SIDA1 $SIDA1 "Message-1"
|
||||
executeOk_servald rhizome list
|
||||
assert_rhizome_list --fromhere=1 --author=$SIDA1 ''
|
||||
executeOk_servald meshms list messages $SIDA1 $SIDA1
|
||||
assertStdoutLineCount '==' 4
|
||||
assertStdoutGrep --stdout --stderr --matches=1 '^0:.*:received:meshms:Message-1'
|
||||
assertStdoutGrep --stdout --stderr --matches=1 '^1:.*:unacknowledged:meshms:Message-1'
|
||||
}
|
||||
|
||||
doc_twoPly="Send one message each way, no acks, correct order"
|
||||
setup_twoPly() {
|
||||
setup
|
||||
}
|
||||
test_twoPly() {
|
||||
executeOk_servald meshms add message 12345 67890 $SIDA1 $SIDA2 "Message-1a"
|
||||
executeOk_servald rhizome list
|
||||
assert_rhizome_list --fromhere=1 --author=$SIDA1 ''
|
||||
executeOk_servald meshms add message 12345 67890 $SIDA2 $SIDA1 "Message-2b"
|
||||
executeOk_servald meshms list messages $SIDA1 $SIDA1
|
||||
assertStdoutLineCount '==' 2
|
||||
executeOk_servald meshms list messages $SIDA2 $SIDA2
|
||||
assertStdoutLineCount '==' 2
|
||||
executeOk_servald meshms list messages $SIDA1 $SIDA2
|
||||
assertStdoutLineCount '==' 4
|
||||
assertStdoutGrep --stdout --stderr --matches=1 '^0:.*:received:meshms:Message-2b'
|
||||
assertStdoutGrep --stdout --stderr --matches=1 '^1:.*:unacknowledged:meshms:Message-1a'
|
||||
}
|
||||
|
||||
runTests "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user