diff options
Diffstat (limited to 'src/test/test_options.c')
-rw-r--r-- | src/test/test_options.c | 52 |
1 files changed, 2 insertions, 50 deletions
diff --git a/src/test/test_options.c b/src/test/test_options.c index 396965401e..a0efd7d051 100644 --- a/src/test/test_options.c +++ b/src/test/test_options.c @@ -2424,36 +2424,6 @@ test_options_validate__circuits(void *ignored) } static void -test_options_validate__tor2web(void *ignored) -{ - (void)ignored; - int ret; - char *msg; - options_test_data_t *tdata = NULL; - - free_options_test_data(tdata); - tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES - "Tor2webRendezvousPoints 1\n"); - ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); - tt_int_op(ret, OP_EQ, -1); - tt_str_op(msg, OP_EQ, - "Tor2webRendezvousPoints cannot be set without Tor2webMode."); - tor_free(msg); - - free_options_test_data(tdata); - tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES - "Tor2webRendezvousPoints 1\nTor2webMode 1\n"); - ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); - tt_int_op(ret, OP_EQ, 0); - tor_free(msg); - - done: - policies_free_all(); - free_options_test_data(tdata); - tor_free(msg); -} - -static void test_options_validate__rend(void *ignored) { (void)ignored; @@ -2566,13 +2536,11 @@ test_options_validate__single_onion(void *ignored) tt_ptr_op(msg, OP_EQ, NULL); free_options_test_data(tdata); - /* Test that SOCKSPort must come with Tor2webMode if - * HiddenServiceSingleHopMode is 1 */ + /* Test that SOCKSPort if HiddenServiceSingleHopMode is 1 */ tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES "SOCKSPort 5000\n" "HiddenServiceSingleHopMode 1\n" "HiddenServiceNonAnonymousMode 1\n" - "Tor2webMode 0\n" ); ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); tt_int_op(ret, OP_EQ, -1); @@ -2587,7 +2555,6 @@ test_options_validate__single_onion(void *ignored) "SOCKSPort 0\n" "HiddenServiceSingleHopMode 1\n" "HiddenServiceNonAnonymousMode 1\n" - "Tor2webMode 0\n" ); ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); tt_int_op(ret, OP_EQ, 0); @@ -2597,27 +2564,13 @@ test_options_validate__single_onion(void *ignored) tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES "SOCKSPort 5000\n" "HiddenServiceSingleHopMode 0\n" - "Tor2webMode 0\n" - ); - ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); - tt_int_op(ret, OP_EQ, 0); - tt_ptr_op(msg, OP_EQ, NULL); - free_options_test_data(tdata); - - tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES - "SOCKSPort 5000\n" - "HiddenServiceSingleHopMode 1\n" - "HiddenServiceNonAnonymousMode 1\n" - "Tor2webMode 1\n" ); ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); tt_int_op(ret, OP_EQ, 0); tt_ptr_op(msg, OP_EQ, NULL); free_options_test_data(tdata); - /* Test that a hidden service can't be run with Tor2web - * Use HiddenServiceNonAnonymousMode instead of Tor2webMode, because - * Tor2webMode requires a compilation #define */ + /* Test that a hidden service can't be run in non anonymous mode. */ tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES "HiddenServiceNonAnonymousMode 1\n" "HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/\n" @@ -4222,7 +4175,6 @@ struct testcase_t options_tests[] = { LOCAL_VALIDATE_TEST(path_bias), LOCAL_VALIDATE_TEST(bandwidth), LOCAL_VALIDATE_TEST(circuits), - LOCAL_VALIDATE_TEST(tor2web), LOCAL_VALIDATE_TEST(rend), LOCAL_VALIDATE_TEST(single_onion), LOCAL_VALIDATE_TEST(accounting), |