Skip to content

Commit

Permalink
fix: make the regex a constant
Browse files Browse the repository at this point in the history
OCD-4785
  • Loading branch information
tmy1313 committed Jan 9, 2025
1 parent e879c7e commit cfec0b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
@Log4j2(topic = "serviceBaseUrlListUptimeCreatorJobLogger")
@Component
public class DatadogSyntheticsTestService {
public static final String NOT_EMPTY_REGEX = "/[\\S]+/";
private static final Integer HTTP_STATUS_OK = 200;
private static final String HTTP_METHOD_GET = "GET";
private static final Long SECONDS_IN_A_MINUTE = 60L;
Expand Down Expand Up @@ -110,7 +111,7 @@ public SyntheticsAPITest createSyntheticsTest(String url, List<Long> developerId
.type(SyntheticsAssertionType.STATUS_CODE)),
new SyntheticsAssertion(new SyntheticsAssertionTarget()
.operator(SyntheticsAssertionOperator.MATCHES)
.target("/[\\S]+/")
.target(NOT_EMPTY_REGEX)
.type(SyntheticsAssertionType.BODY))))
.request(new SyntheticsTestRequest()
.url(url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void execute(JobExecutionContext context) throws JobExecutionException {
.type(SyntheticsAssertionType.STATUS_CODE)),
new SyntheticsAssertion(new SyntheticsAssertionTarget()
.operator(SyntheticsAssertionOperator.MATCHES)
.target("/[\\S]+/")
.target(DatadogSyntheticsTestService.NOT_EMPTY_REGEX)
.type(SyntheticsAssertionType.BODY))))
.request(new SyntheticsTestRequest()
.url(url)
Expand Down

0 comments on commit cfec0b8

Please sign in to comment.