Fix failing 'dnahelper' test case

This commit is contained in:
Andrew Bettison 2012-08-09 12:21:40 +09:30
parent 12d8bc0c12
commit ec4384ae7d
2 changed files with 3 additions and 1 deletions

View File

@ -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))

View File

@ -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"