Skip to content

Commit

Permalink
aws_request_signing: fix coverage (#12229)
Browse files Browse the repository at this point in the history
Fixes #11990.

Signed-off-by: Raul Gutierrez Segales <[email protected]>
  • Loading branch information
Raúl Gutiérrez Segalés authored Jul 22, 2020
1 parent f977326 commit 31cb2b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ TEST_F(AwsRequestSigningFilterTest, SignFails) {
EXPECT_EQ(1UL, filter_config_->stats_.signing_failed_.value());
}

// Verify FilterConfigImpl's getters.
TEST_F(AwsRequestSigningFilterTest, FilterConfigImplGetters) {
Stats::IsolatedStoreImpl stats;
auto signer = std::make_unique<Common::Aws::MockSigner>();
const auto* signer_ptr = signer.get();
FilterConfigImpl config(std::move(signer), "prefix", stats, "foo");

EXPECT_EQ(signer_ptr, &config.signer());
EXPECT_EQ(0UL, config.stats().signing_added_.value());
EXPECT_EQ("foo", config.hostRewrite());
}

} // namespace
} // namespace AwsRequestSigningFilter
} // namespace HttpFilters
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 @@ -38,7 +38,6 @@ declare -a KNOWN_LOW_COVERAGE=(
"source/extensions/filters/http/ip_tagging:91.2"
"source/extensions/filters/http/grpc_json_transcoder:93.3"
"source/extensions/filters/http/aws_lambda:96.4"
"source/extensions/filters/http/aws_request_signing:93.3"
"source/extensions/filters/listener:96.0"
"source/extensions/filters/listener/tls_inspector:92.4"
"source/extensions/filters/listener/http_inspector:93.3"
Expand Down

0 comments on commit 31cb2b4

Please sign in to comment.