Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bchhay-splunk committed May 21, 2024
1 parent c1fa7ec commit 0078b72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions syntheticsclientv2/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,11 +848,13 @@ func TestLiveDowntimeConfigurationCreateUpdateAndDeleteV2(t *testing.T) {
c := NewClient(token, realm)
var err error

//There are restrictions on startTime and endTime for a downtime_configuration so we set the startTime to 10 days
//in the future and the endTime to be 1 hour after the startTime
year, month, day := time.Now().Add(10 * time.Day).Date()
startTime := fmt.Sprintf("%s-%s-%sT20:00:00.000Z", year, int(month), day)
endTime := fmt.Sprintf("%s-%s-%sT21:00:00.000Z", year, int(month), day)

createDowntimeConfigurationV2Body := fmt.Sprintf("{\"downtimeConfiguration\":{\"name\":\"dc test\",\"description\":\"My super awesome test downtimeConfiguration\",\"rule\":\"augment_data\",\"testIds\":[482],\"startTime\":\"%s\",\"endTime\":\"%s\"}}", startTime, endTime)
createDowntimeConfigurationV2Body := fmt.Sprintf("{\"downtimeConfiguration\":{\"name\":\"dc test\",\"description\":\"My super awesome test downtimeConfiguration\",\"rule\":\"augment_data\",\"testIds\":[1111],\"startTime\":\"%s\",\"endTime\":\"%s\"}}", startTime, endTime)

downtimeConfigId, err := CreateDowntimeConfigurationV2(createDowntimeConfigurationV2Body, c)
if err != nil {
Expand All @@ -864,7 +866,7 @@ func TestLiveDowntimeConfigurationCreateUpdateAndDeleteV2(t *testing.T) {
t.Fatal(err)
}

updateDowntimeConfigurationV2Body := fmt.Sprintf("{\"downtimeConfiguration\":{\"name\":\"dc test\",\"description\":\"My super awesome test downtimeConfiguration\",\"rule\":\"pause_tests\",\"testIds\":[482],\"startTime\":\"%s\",\"endTime\":\"%s\"}}", startTime, endTime)
updateDowntimeConfigurationV2Body := fmt.Sprintf("{\"downtimeConfiguration\":{\"name\":\"dc test\",\"description\":\"My super awesome test downtimeConfiguration\",\"rule\":\"pause_tests\",\"testIds\":[1111],\"startTime\":\"%s\",\"endTime\":\"%s\"}}", startTime, endTime)

err = UpdateDowntimeConfigurationV2(downtimeConfigId, updateDowntimeConfigurationV2Body, c)
if err != nil {
Expand Down

0 comments on commit 0078b72

Please sign in to comment.