Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
4b4571ab
Commit
4b4571ab
authored
8 years ago
by
yang-g
Browse files
Options
Downloads
Patches
Plain Diff
Add a test for nonbin header containing binary value
parent
c580af37
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/cpp/end2end/end2end_test.cc
+17
-0
17 additions, 0 deletions
test/cpp/end2end/end2end_test.cc
with
17 additions
and
0 deletions
test/cpp/end2end/end2end_test.cc
+
17
−
0
View file @
4b4571ab
...
...
@@ -1350,6 +1350,23 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginKeyFailure) {
EXPECT_EQ
(
s
.
error_code
(),
StatusCode
::
UNAUTHENTICATED
);
}
TEST_P
(
SecureEnd2endTest
,
AuthMetadataPluginValueFailure
)
{
ResetStub
();
EchoRequest
request
;
EchoResponse
response
;
ClientContext
context
;
context
.
set_credentials
(
MetadataCredentialsFromPlugin
(
std
::
unique_ptr
<
MetadataCredentialsPlugin
>
(
new
TestMetadataCredentialsPlugin
(
TestMetadataCredentialsPlugin
::
kGoodMetadataKey
,
"With binary
\n
data"
,
false
,
true
))));
request
.
set_message
(
"Hello"
);
Status
s
=
stub_
->
Echo
(
&
context
,
request
,
&
response
);
EXPECT_FALSE
(
s
.
ok
());
EXPECT_EQ
(
s
.
error_code
(),
StatusCode
::
UNAUTHENTICATED
);
}
TEST_P
(
SecureEnd2endTest
,
NonBlockingAuthMetadataPluginFailure
)
{
ResetStub
();
EchoRequest
request
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment