Skip to content

Commit

Permalink
s/getResponseFlags/responseFlags
Browse files Browse the repository at this point in the history
Signed-off-by: Pengyuan Bian <bianpengyuan@google.com>
  • Loading branch information
bianpengyuan committed Nov 4, 2019
1 parent c3138d3 commit 8a902a3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/envoy/stream_info/stream_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class StreamInfo {
/**
* @return response flags encoded as an integer.
*/
virtual uint64_t getResponseFlags() const PURE;
virtual uint64_t responseFlags() const PURE;

/**
* @return upstream host description.
Expand Down
2 changes: 1 addition & 1 deletion source/common/stream_info/stream_info_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ struct StreamInfoImpl : public StreamInfo {

bool hasAnyResponseFlag() const override { return response_flags_ != 0; }

uint64_t getResponseFlags() const override { return response_flags_; }
uint64_t responseFlags() const override { return response_flags_; }

void onUpstreamHostSelected(Upstream::HostDescriptionConstSharedPtr host) override {
upstream_host_ = host;
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/filters/common/expr/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ absl::optional<CelValue> ResponseWrapper::operator[](CelValue key) const {
} else if (value == Trailers) {
return CelValue::CreateMap(&trailers_);
} else if (value == Flags) {
return CelValue::CreateInt64(info_.getResponseFlags());
return CelValue::CreateInt64(info_.responseFlags());
}
return {};
}
Expand Down
2 changes: 1 addition & 1 deletion test/common/stream_info/stream_info_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ TEST_F(StreamInfoImplTest, ResponseFlagTest) {
<< fmt::format("Flag: {} was expected to be set", flag);
}
EXPECT_TRUE(stream_info.hasAnyResponseFlag());
EXPECT_EQ(0xFFF, stream_info.getResponseFlags());
EXPECT_EQ(0xFFF, stream_info.responseFlags());

StreamInfoImpl stream_info2(Http::Protocol::Http2, test_time_.timeSystem());
stream_info2.setResponseFlag(FailedLocalHealthCheck);
Expand Down
2 changes: 1 addition & 1 deletion test/common/stream_info/test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TestStreamInfo : public StreamInfo::StreamInfo {
void setResponseFlag(Envoy::StreamInfo::ResponseFlag response_flag) override {
response_flags_ |= response_flag;
}
uint64_t getResponseFlags() const override { return response_flags_; }
uint64_t responseFlags() const override { return response_flags_; }
void onUpstreamHostSelected(Upstream::HostDescriptionConstSharedPtr host) override {
upstream_host_ = host;
}
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/common/expr/context_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ TEST(Context, ResponseAttributes) {

EXPECT_CALL(info, responseCode()).WillRepeatedly(Return(404));
EXPECT_CALL(info, bytesSent()).WillRepeatedly(Return(123));
EXPECT_CALL(info, getResponseFlags()).WillRepeatedly(Return(0x1));
EXPECT_CALL(info, responseFlags()).WillRepeatedly(Return(0x1));

{
auto value = response[CelValue::CreateString(Undefined)];
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/stream_info/mocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MockStreamInfo : public StreamInfo {
MOCK_CONST_METHOD0(bytesSent, uint64_t());
MOCK_CONST_METHOD1(hasResponseFlag, bool(ResponseFlag));
MOCK_CONST_METHOD0(hasAnyResponseFlag, bool());
MOCK_CONST_METHOD0(getResponseFlags, uint64_t());
MOCK_CONST_METHOD0(responseFlags, uint64_t());
MOCK_CONST_METHOD0(upstreamHost, Upstream::HostDescriptionConstSharedPtr());
MOCK_METHOD1(setUpstreamLocalAddress, void(const Network::Address::InstanceConstSharedPtr&));
MOCK_CONST_METHOD0(upstreamLocalAddress, const Network::Address::InstanceConstSharedPtr&());
Expand Down

0 comments on commit 8a902a3

Please sign in to comment.