Skip to content

Commit

Permalink
oauth2: improving coverage (#14479)
Browse files Browse the repository at this point in the history
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
  • Loading branch information
alyssawilk authored Dec 21, 2020
1 parent b0331ef commit c5946e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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 @@ -40,7 +40,6 @@ declare -a KNOWN_LOW_COVERAGE=(
"source/extensions/filters/http/grpc_json_transcoder:94.8"
"source/extensions/filters/http/ip_tagging:91.2"
"source/extensions/filters/http/kill_request:95.0" # Death tests don't report LCOV
"source/extensions/filters/http/oauth2:96.5"
"source/extensions/filters/listener:96.5"
"source/extensions/filters/listener/tls_inspector:92.4"
"source/extensions/filters/network/common:96.1"
Expand Down

0 comments on commit c5946e3

Please sign in to comment.