Skip to content

Commit

Permalink
Update the tests to match
Browse files Browse the repository at this point in the history
  • Loading branch information
joegallo committed Aug 31, 2023
1 parent 0144876 commit 860497b
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void testIsYellowWhenPoliciesHaveFailedForMoreThanWarningThreshold() {
Map.of(
"test-policy",
SnapshotLifecyclePolicyMetadata.builder()
.setPolicy(new SnapshotLifecyclePolicy("policy-id-1", "test-policy", "", "test-repository", null, null))
.setPolicy(new SnapshotLifecyclePolicy("test-policy", "<test-policy-{now/d}>", "", "test-repository", null, null))
.setVersion(1L)
.setModifiedDate(System.currentTimeMillis())
.setLastSuccess(snapshotInvocation(execTime, execTime + 1000L))
Expand All @@ -191,7 +191,14 @@ public void testIsYellowWhenPoliciesHaveFailedForMoreThanWarningThreshold() {
"test-policy-without-any-success",
SnapshotLifecyclePolicyMetadata.builder()
.setPolicy(
new SnapshotLifecyclePolicy("policy-id-2", "test-policy-without-any-success", "", "test-repository", null, null)
new SnapshotLifecyclePolicy(
"test-policy-without-any-success",
"<test-policy-{now/d}>",
"",
"test-repository",
null,
null
)
)
.setVersion(1L)
.setModifiedDate(System.currentTimeMillis())
Expand All @@ -203,8 +210,8 @@ public void testIsYellowWhenPoliciesHaveFailedForMoreThanWarningThreshold() {
SnapshotLifecyclePolicyMetadata.builder()
.setPolicy(
new SnapshotLifecyclePolicy(
"policy-id-3",
"test-policy-without-success-start-time",
"<test-policy-{now/d}>",
"",
"test-repository",
null,
Expand Down Expand Up @@ -280,9 +287,9 @@ public void testIsYellowWhenPoliciesHaveFailedForMoreThanWarningThreshold() {
+ failedInvocations3
+ "] repeated failures without successful execution",
"Check the snapshot lifecycle policies for detailed failure info:\n"
+ "- GET /_slm/policy/policy-id-1?human\n"
+ "- GET /_slm/policy/policy-id-2?human\n"
+ "- GET /_slm/policy/policy-id-3?human"
+ "- GET /_slm/policy/test-policy?human\n"
+ "- GET /_slm/policy/test-policy-without-any-success?human\n"
+ "- GET /_slm/policy/test-policy-without-success-start-time?human"

),
List.of(
Expand Down

0 comments on commit 860497b

Please sign in to comment.