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-03-03 14:05:49 -08:00
parent 4d5e4c4057
commit d7913c9a80

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
}
}