mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-06 11:09:13 +00:00
Fix failing 'dnahelper' test case
This commit is contained in:
parent
12d8bc0c12
commit
ec4384ae7d
@ -402,6 +402,8 @@ void handle_reply_line(const char *bufp, size_t len)
|
|||||||
WHYF("DNAHELPER reply %s contains empty token -- ignored", alloca_toprint(-1, bufp, len));
|
WHYF("DNAHELPER reply %s contains empty token -- ignored", alloca_toprint(-1, bufp, len));
|
||||||
else if (!str_is_subscriber_id(sidhex))
|
else if (!str_is_subscriber_id(sidhex))
|
||||||
WHYF("DNAHELPER reply %s contains invalid token -- ignored", alloca_toprint(-1, bufp, len));
|
WHYF("DNAHELPER reply %s contains invalid token -- ignored", alloca_toprint(-1, bufp, len));
|
||||||
|
else if (strncmp(sidhex, request_buffer, SID_STRLEN) != 0)
|
||||||
|
WHYF("DNAHELPER reply %s contains mismatched token -- ignored", alloca_toprint(-1, bufp, len));
|
||||||
else if (did[0] == '\0')
|
else if (did[0] == '\0')
|
||||||
WHYF("DNAHELPER reply %s contains empty DID -- ignored", alloca_toprint(-1, bufp, len));
|
WHYF("DNAHELPER reply %s contains empty DID -- ignored", alloca_toprint(-1, bufp, len));
|
||||||
else if (!str_is_did(did))
|
else if (!str_is_did(did))
|
||||||
|
@ -302,7 +302,7 @@ doc_TokenMismatch="DNA helper returns mismatched token"
|
|||||||
test_TokenMismatch() {
|
test_TokenMismatch() {
|
||||||
executeOk_servald dna lookup 000061
|
executeOk_servald dna lookup 000061
|
||||||
assertStdoutIs ""
|
assertStdoutIs ""
|
||||||
assertGrep --matches=0 "$LOGA" 'ERROR:.*DNAHELPER'
|
assertGrep "$LOGA" 'ERROR:.*DNAHELPER.*mismatched token'
|
||||||
}
|
}
|
||||||
|
|
||||||
doc_TokenEmpty="DNA helper returns empty token"
|
doc_TokenEmpty="DNA helper returns empty token"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user