Skip to content

Commit

Permalink
test CI
Browse files Browse the repository at this point in the history
Change-Id: Ifa9f8e1da03c7404044de12a3a825929420a9dcf
Signed-off-by: Kuat Yessenov <[email protected]>
  • Loading branch information
kyessenov committed Jul 31, 2024
1 parent 5021307 commit 5931ba6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/extensions/path/uri_template_lib/uri_template_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ TEST_P(ParseRewriteHelperSuccess, ParseRewriteHelperSuccessTest) {
SCOPED_TRACE(pattern);

const auto result = parseRewritePattern(pattern);
EXPECT_OK(result);
EXPECT_OK(result.status());

// The following is to exercise operator<< in ParseSegments.
const auto& parsed_segments_vec = result.value();
Expand Down Expand Up @@ -100,7 +100,7 @@ class ParseRewriteSuccess : public testing::TestWithParam<std::string> {
};

TEST(ParseRewrite, InvalidRegex) {
EXPECT_THAT(parseRewritePattern("/{var1}", "+[abc"), StatusIs(absl::StatusCode::kInternal));
EXPECT_EQ(parseRewritePattern("/{var1}", "+[abc").status().code(), absl::StatusCode::kInternal);
}

INSTANTIATE_TEST_SUITE_P(ParseRewriteSuccessTestSuite, ParseRewriteSuccess,
Expand All @@ -111,7 +111,7 @@ INSTANTIATE_TEST_SUITE_P(ParseRewriteSuccessTestSuite, ParseRewriteSuccess,

TEST_P(ParseRewriteSuccess, ParseRewriteSuccessTest) {
absl::StatusOr<RewriteSegments> rewrite = parseRewritePattern(rewritePattern(), kCaptureRegex);
ASSERT_OK(rewrite);
ASSERT_OK(rewrite.status());
}

class ParseRewriteFailure : public testing::TestWithParam<std::string> {};
Expand All @@ -124,8 +124,8 @@ TEST_P(ParseRewriteFailure, ParseRewriteFailureTest) {
std::string pattern = GetParam();
SCOPED_TRACE(pattern);

EXPECT_THAT(parseRewritePattern(pattern, kCaptureRegex),
StatusIs(absl::StatusCode::kInvalidArgument));
EXPECT_EQ(parseRewritePattern(pattern, kCaptureRegex).status().code(),
absl::StatusCode::kInvalidArgument);
}

class PathPatternMatchAndRewrite
Expand Down Expand Up @@ -157,7 +157,7 @@ TEST_P(PathPatternMatchAndRewrite, PathPatternMatchAndRewriteTest) {

absl::StatusOr<RewriteSegments> rewrite_segment =
parseRewritePattern(rewritePattern(), regex.value());
ASSERT_OK(rewrite_segment);
ASSERT_OK(rewrite_segment.status());
}

TEST_P(PathPatternMatchAndRewrite, IsValidMatchPattern) {
Expand Down

0 comments on commit 5931ba6

Please sign in to comment.