Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
64251957
Commit
64251957
authored
Oct 23, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show output of curl if some cases in test/brpc_server_unittest.cpp fail
parent
4c39a496
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
brpc_server_unittest.cpp
test/brpc_server_unittest.cpp
+9
-2
No files found.
test/brpc_server_unittest.cpp
View file @
64251957
...
...
@@ -1283,10 +1283,17 @@ TEST_F(ServerTest, too_big_message) {
server
.
Join
();
}
struct
EchoCurlMsg
{};
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
EchoCurlMsg
)
{
std
::
ifstream
t
(
"curl.msg"
);
return
os
<<
"============ The output of previous curl ============
\n
"
<<
t
.
rdbuf
()
<<
"
\n
============ The output ends here ============
\n
"
;
}
void
CheckCert
(
const
char
*
address
,
const
char
*
cert
)
{
std
::
string
cmd
=
butil
::
string_printf
(
"/usr/bin/curl -Ikv https://%s
2>&1 | grep %s
"
,
address
,
cert
);
ASSERT_EQ
(
0
,
system
(
cmd
.
c_str
()));
"/usr/bin/curl -Ikv https://%s
>curl.msg 2>&1; grep %s curl.msg
"
,
address
,
cert
);
ASSERT_EQ
(
0
,
system
(
cmd
.
c_str
()))
<<
EchoCurlMsg
()
;
}
std
::
string
GetRawPemString
(
const
char
*
fname
)
{
...
...
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