Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
8dc7ad12
Commit
8dc7ad12
authored
Mar 12, 2020
by
Nick Mathewson
🏃
Browse files
Fix unit tests that look at contactinfo logs.
parent
b755a489
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/test_options.c
View file @
8dc7ad12
...
...
@@ -485,7 +485,8 @@ test_options_validate__uname_for_server(void *ignored)
#endif
options_test_data_t
*
tdata
=
get_options_test_data
(
"ORPort 127.0.0.1:5555"
);
"ORPort 127.0.0.1:5555
\n
"
"ContactInfo nobody@example.com"
);
setup_capture_of_logs
(
LOG_WARN
);
MOCK
(
get_uname
,
fixed_get_uname
);
...
...
@@ -633,9 +634,11 @@ test_options_validate__contactinfo(void *ignored)
ret
=
options_validate
(
tdata
->
old_opt
,
tdata
->
opt
,
tdata
->
def_opt
,
0
,
&
msg
);
tt_int_op
(
ret
,
OP_EQ
,
-
1
);
expect_log_msg
(
"Your ContactInfo config option is not"
" set. Please consider setting it, so we can contact you if your"
" server is misconfigured or something else goes wrong.
\n
"
);
"Your ContactInfo config option is not set. Please strongly "
"consider setting it, so we can contact you if your relay is "
"misconfigured, end-of-life, or something else goes wrong. It "
"is also possible that your relay might get rejected from the "
"network due to a missing valid contact address.
\n
"
);
tor_free
(
msg
);
free_options_test_data
(
tdata
);
...
...
@@ -645,9 +648,11 @@ test_options_validate__contactinfo(void *ignored)
ret
=
options_validate
(
tdata
->
old_opt
,
tdata
->
opt
,
tdata
->
def_opt
,
0
,
&
msg
);
tt_int_op
(
ret
,
OP_EQ
,
-
1
);
expect_no_log_msg
(
"Your ContactInfo config option is not"
" set. Please consider setting it, so we can contact you if your"
" server is misconfigured or something else goes wrong.
\n
"
);
"Your ContactInfo config option is not set. Please strongly "
"consider setting it, so we can contact you if your relay is "
"misconfigured, end-of-life, or something else goes wrong. It "
"is also possible that your relay might get rejected from the "
"network due to a missing valid contact address.
\n
"
);
tor_free
(
msg
);
done:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment