Skip to content

Commit

Permalink
[ext_authz_fuzzer] cleaned up the try-catch logic (#12055)
Browse files Browse the repository at this point in the history
Fixed the style in ext_authz fuzzer protobuf file: Added a new line.
Cleaned up the try-catch logic in the fuzz test.

Signed-off-by: jianwen <[email protected]>
  • Loading branch information
jianwen612 authored Jul 15, 2020
1 parent d683687 commit 4cd3510
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ message ExtAuthzTestCase {
envoy.extensions.filters.network.ext_authz.v3.ExtAuthz config = 1
[(validate.rules).message = {required: true}];
repeated Action actions = 2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,9 @@ Filters::Common::ExtAuthz::CheckStatus resultCaseToCheckStatus(
DEFINE_PROTO_FUZZER(const envoy::extensions::filters::network::ext_authz::ExtAuthzTestCase& input) {
try {
TestUtility::validate(input);
} catch (const ProtoValidationException& e) {
ENVOY_LOG_MISC(debug, "ProtoValidationException: {}", e.what());
return;
} catch (const ProtobufMessage::DeprecatedProtoFieldException& e) {
ENVOY_LOG_MISC(debug, "DeprecatedProtoFieldException: {}", e.what());
return;
} catch (const EnvoyException& e) {
ENVOY_LOG_MISC(debug, "EnvoyException during validation: {}", e.what());
return;
}

Stats::TestUtil::TestStore stats_store;
Expand Down

0 comments on commit 4cd3510

Please sign in to comment.