Skip to content

Commit

Permalink
fixes to grafana cloud tests (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
MuneebAijaz authored Aug 28, 2024
1 parent b6c00b2 commit 1b5a3a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions pkg/monitors/grafana/grafana-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ func (service *GrafanaMonitorService) GetAll() (monitors []models.Monitor) {
URL: check.Target,
ID: fmt.Sprintf("%v", check.Id),
Config: &endpointmonitorv1alpha1.GrafanaConfig{
TenantId: check.TenantId,
Frequency: check.Frequency,
Probes: probes,
TenantId: check.TenantId,
Frequency: check.Frequency,
Probes: probes,
AlertSensitivity: check.AlertSensitivity,
},
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitors/grafana/grafana-monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func TestAddMonitorWithCorrectValues(t *testing.T) {
providerConfig, _ := m.Config.(*endpointmonitorv1alpha1.GrafanaConfig)

if monitor.Name != m.Name || monitor.URL != m.URL || monitorConfig.Frequency != providerConfig.Frequency || reflect.DeepEqual(monitorConfig.Probes, providerConfig.Probes) || monitorConfig.AlertSensitivity != providerConfig.AlertSensitivity {
t.Error("URL, name, frequency and probes should be the same", monitor, m)
t.Error("URL, name, frequency, probes and alertSensitivity should be the same", monitor, m)
}
service.Remove(*monitor)

Expand Down

0 comments on commit 1b5a3a2

Please sign in to comment.