From 1b5a3a20a2963efdce41b621f64172d92914ba39 Mon Sep 17 00:00:00 2001 From: Muneeb Aijaz <43588696+MuneebAijaz@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:57:00 +0500 Subject: [PATCH] fixes to grafana cloud tests (#605) --- pkg/monitors/grafana/grafana-monitor.go | 7 ++++--- pkg/monitors/grafana/grafana-monitor_test.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/monitors/grafana/grafana-monitor.go b/pkg/monitors/grafana/grafana-monitor.go index 019af8fb..965e2c44 100644 --- a/pkg/monitors/grafana/grafana-monitor.go +++ b/pkg/monitors/grafana/grafana-monitor.go @@ -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, }, }) } diff --git a/pkg/monitors/grafana/grafana-monitor_test.go b/pkg/monitors/grafana/grafana-monitor_test.go index 4400370c..74caef2f 100644 --- a/pkg/monitors/grafana/grafana-monitor_test.go +++ b/pkg/monitors/grafana/grafana-monitor_test.go @@ -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)