diff options
Diffstat (limited to 'src/test/test_hs.c')
-rw-r--r-- | src/test/test_hs.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/test/test_hs.c b/src/test/test_hs.c index 0ee46c2a58..a5cd841a55 100644 --- a/src/test/test_hs.c +++ b/src/test/test_hs.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2013, The Tor Project, Inc. */ +/* Copyright (c) 2007-2014, The Tor Project, Inc. */ /* See LICENSE for licensing information */ /** @@ -85,7 +85,7 @@ test_hs_desc_event(void *arg) expected_msg = "650 HS_DESC REQUESTED "STR_HS_ADDR" NO_AUTH "\ STR_HSDIR_EXIST_LONGNAME" "STR_HS_ID"\r\n"; tt_assert(received_msg); - tt_str_op(received_msg,==, expected_msg); + tt_str_op(received_msg,OP_EQ, expected_msg); tor_free(received_msg); /* test received event */ @@ -94,25 +94,27 @@ test_hs_desc_event(void *arg) expected_msg = "650 HS_DESC RECEIVED "STR_HS_ADDR" BASIC_AUTH "\ STR_HSDIR_EXIST_LONGNAME"\r\n"; tt_assert(received_msg); - tt_str_op(received_msg,==, expected_msg); + tt_str_op(received_msg,OP_EQ, expected_msg); tor_free(received_msg); /* test failed event */ rend_query.auth_type = 2; - control_event_hs_descriptor_failed(&rend_query, HSDIR_NONE_EXIST_ID); + control_event_hs_descriptor_failed(&rend_query, HSDIR_NONE_EXIST_ID, + "QUERY_REJECTED"); expected_msg = "650 HS_DESC FAILED "STR_HS_ADDR" STEALTH_AUTH "\ - STR_HSDIR_NONE_EXIST_LONGNAME"\r\n"; + STR_HSDIR_NONE_EXIST_LONGNAME" REASON=QUERY_REJECTED\r\n"; tt_assert(received_msg); - tt_str_op(received_msg,==, expected_msg); + tt_str_op(received_msg,OP_EQ, expected_msg); tor_free(received_msg); /* test invalid auth type */ rend_query.auth_type = 999; - control_event_hs_descriptor_failed(&rend_query, HSDIR_EXIST_ID); + control_event_hs_descriptor_failed(&rend_query, HSDIR_EXIST_ID, + "QUERY_REJECTED"); expected_msg = "650 HS_DESC FAILED "STR_HS_ADDR" UNKNOWN "\ - STR_HSDIR_EXIST_LONGNAME"\r\n"; + STR_HSDIR_EXIST_LONGNAME" REASON=QUERY_REJECTED\r\n"; tt_assert(received_msg); - tt_str_op(received_msg,==, expected_msg); + tt_str_op(received_msg,OP_EQ, expected_msg); tor_free(received_msg); done: |