Skip to content

Commit

Permalink
FFM-1082 Fix values for startTime , stopTime to read from json file
Browse files Browse the repository at this point in the history
  • Loading branch information
pdoshisplunk committed Aug 29, 2024
1 parent b276e5e commit 55d01a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions metric_ruleset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestCreateArchivedMetricRuleset(t *testing.T) {
mux.HandleFunc(MetricRulesetApiURL, verifyRequest(t, http.MethodPost, true, http.StatusOK, nil, "metric_ruleset/create_archived_ruleset_success.json"))

dest := "Archived"
restorationID := "ABC"
restorationID := "GWBTAQwAAAA"
metricName := "container_cpu_utilization"
ruleName := "TestRule"
rulesetDescription := "Metric ruleset for container_cpu_utilization"
Expand Down Expand Up @@ -59,8 +59,9 @@ func TestCreateArchivedMetricRuleset(t *testing.T) {

assert.NoError(t, err, "Unexpected error creating metric ruleset")
assert.NotNil(t, restorationID, "Restoration ID is null")
assert.NotNil(t, &startTime, "StartTime is null")
assert.NotNil(t, &stopTime, "StartTime is null")
assert.Equal(t, restorationID, *result.ExceptionRules[0].Restoration.RestorationId, "Restoration ID does not match")
assert.Equal(t, int64(1724793174572), *result.ExceptionRules[0].Restoration.StartTime, "StartTime does not match")
assert.NotNil(t, int64(1724796774661), *result.ExceptionRules[0].Restoration.StopTime, "StartTime does not match")
assert.Equal(t, metricName, *result.MetricName, "MetricName does not match")
assert.Equal(t, rulesetDescription, *result.Description, "Description does not match")
assert.Equal(t, 1, len(result.ExceptionRules), "Unexpected length of exception rules array")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
} ],
"type": "dimension"
},
"restoration" : {
"restorationId" : "GWBTAQwAAAA",
"startTime" : 1724793174572,
"stopTime" : 1724796774661
},
"name": "TestRule",
"description": "exception rule 1"
}
Expand Down

0 comments on commit 55d01a0

Please sign in to comment.