mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 15:43:56 +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));
|
||||
else if (!str_is_subscriber_id(sidhex))
|
||||
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')
|
||||
WHYF("DNAHELPER reply %s contains empty DID -- ignored", alloca_toprint(-1, bufp, len));
|
||||
else if (!str_is_did(did))
|
||||
|
@ -302,7 +302,7 @@ doc_TokenMismatch="DNA helper returns mismatched token"
|
||||
test_TokenMismatch() {
|
||||
executeOk_servald dna lookup 000061
|
||||
assertStdoutIs ""
|
||||
assertGrep --matches=0 "$LOGA" 'ERROR:.*DNAHELPER'
|
||||
assertGrep "$LOGA" 'ERROR:.*DNAHELPER.*mismatched token'
|
||||
}
|
||||
|
||||
doc_TokenEmpty="DNA helper returns empty token"
|
||||
|
Loading…
x
Reference in New Issue
Block a user