Skip to content

Commit

Permalink
fix test grafana contact point get by name (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirii1994 authored Dec 3, 2023
1 parent 58d01cf commit 1ee4d2e
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,15 @@ func TestIntegrationGrafanaContactPoint_GetGrafanaContactPointByName(t *testing.
defer test_utils.TestDoneTimeBuffer()

if assert.NoError(t, err) {
contactPoints, err := underTest.GetGrafanaContactPointsByName("miri-slack2")
assert.NoError(t, err)
assert.NotEmpty(t, contactPoints)
createGrafanaContactPoint := getGrafanaContactPointObject()
createGrafanaContactPoint.Name = fmt.Sprintf("%s_%s", createGrafanaContactPoint.Name, "by_name")
contactPoint, err := underTest.CreateGrafanaContactPoint(createGrafanaContactPoint)
if assert.NoError(t, err) && assert.NotEmpty(t, contactPoint) {
time.Sleep(4 * time.Second)
defer underTest.DeleteGrafanaContactPoint(contactPoint.Uid)
contactPoints, err := underTest.GetGrafanaContactPointsByName(createGrafanaContactPoint.Name)
assert.NoError(t, err)
assert.NotEmpty(t, contactPoints)
}
}
}

0 comments on commit 1ee4d2e

Please sign in to comment.