Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauth2: improving coverage #14479

Merged
merged 2 commits into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions test/extensions/filters/http/oauth2/filter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ TEST_F(OAuth2Test, CookieValidator) {
};

auto cookie_validator = std::make_shared<OAuth2CookieValidator>(test_time_);
EXPECT_EQ(cookie_validator->token(), "");
cookie_validator->setParams(request_headers, "mock-secret");

EXPECT_TRUE(cookie_validator->hmacIsValid());
Expand Down Expand Up @@ -588,6 +589,7 @@ TEST_F(OAuth2Test, OAuthTestFullFlowPostWithParameters) {
filter_->decodeHeaders(second_request_headers, false));

EXPECT_EQ(1, config_->stats().oauth_unauthorized_rq_.value());
EXPECT_EQ(config_->clusterName(), "auth.example.com");

// Expected response after the callback & validation is complete - verifying we kept the
// state and method of the original request, including the query string parameters.
Expand Down
1 change: 0 additions & 1 deletion test/per_file_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ declare -a KNOWN_LOW_COVERAGE=(
"source/extensions/filters/http/grpc_json_transcoder:93.3"
"source/extensions/filters/http/ip_tagging:91.2"
"source/extensions/filters/http/kill_request:94.4" # Death tests don't report LCOV
"source/extensions/filters/http/oauth2:96.5"
"source/extensions/filters/listener:96.0"
"source/extensions/filters/listener/http_inspector:93.3"
"source/extensions/filters/listener/tls_inspector:92.4"
Expand Down