Use the correct variable in tests

'es.JiraURL == es.JiraURL' is always true, it should compare es with gs. Fix it and reformat for readability
This commit is contained in:
Łukasz Mierzwa
2018-04-19 09:17:18 -07:00
parent 93c0fbe284
commit 62555df1b0
+4 -1
View File
@@ -870,7 +870,10 @@ func testAlert(version string, t *testing.T, expectedAlert, gotAlert models.Aler
for _, es := range expectedAM.Silences {
foundSilence := false
for _, gs := range gotAM.Silences {
if es.Comment == gs.Comment && es.CreatedBy == gs.CreatedBy && es.JiraID == gs.JiraID && es.JiraURL == es.JiraURL {
if es.Comment == gs.Comment &&
es.CreatedBy == gs.CreatedBy &&
es.JiraID == gs.JiraID &&
es.JiraURL == gs.JiraURL {
foundSilence = true
}
}