Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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: 1 addition & 1 deletion source/common/formatter/http_specific_formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ BuiltInHttpCommandParser::parse(absl::string_view command, absl::string_view sub
}

// Check flags for the command.
THROW_IF_NOT_OK(
RETURN_IF_NOT_OK(
CommandSyntaxChecker::verifySyntax((*it).second.first, command, subcommand, max_length));

// Create a pointer to the formatter by calling a function
Expand Down
1 change: 1 addition & 0 deletions test/common/formatter/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ envoy_cc_test(
"//test/mocks/upstream:cluster_info_mocks",
"//test/test_common:environment_lib",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:status_utility_lib",
"//test/test_common:test_runtime_lib",
"//test/test_common:threadsafe_singleton_injector_lib",
"//test/test_common:utility_lib",
Expand Down
6 changes: 4 additions & 2 deletions test/common/formatter/substitution_formatter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@
#include "test/test_common/environment.h"
#include "test/test_common/printers.h"
#include "test/test_common/simulated_time_system.h"
#include "test/test_common/status_utility.h"
#include "test/test_common/test_runtime.h"
#include "test/test_common/threadsafe_singleton_injector.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"

using Envoy::StatusHelpers::HasStatus;
using testing::Const;
using testing::HasSubstr;
using testing::Invoke;
Expand Down Expand Up @@ -5930,8 +5932,8 @@ TEST(SubstitutionFormatterTest, CoalesceFormatterGridTest) {
TEST(SubstitutionFormatterTest, CoalesceFormatterErrorCases) {
// Empty JSON config.
{
EXPECT_THROW_WITH_MESSAGE(SubstitutionFormatParser::parse("%COALESCE()%").IgnoreError(),
EnvoyException, "COALESCE requires parameters");
EXPECT_THAT(SubstitutionFormatParser::parse("%COALESCE()%"),
HasStatus(absl::StatusCode::kInvalidArgument, "COALESCE requires parameters"));
}

// Invalid JSON.
Expand Down
Loading