Expressions: Fixes the issue showing expressions editor (#62510)
* Use suggested value for uid * update the snapshot * use __expr__ * replace all -100 with __expr__ * update snapshot * more changes * revert redundant change * Use expr.DatasourceUID where it's possible * generate files
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/expr"
|
||||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -253,7 +254,7 @@ func TestIntegrationAdminConfiguration_SendingToExternalAlertmanagers(t *testing
|
||||
From: ngmodels.Duration(time.Duration(5) * time.Hour),
|
||||
To: ngmodels.Duration(time.Duration(3) * time.Hour),
|
||||
},
|
||||
DatasourceUID: "-100",
|
||||
DatasourceUID: expr.DatasourceUID,
|
||||
Model: json.RawMessage(`{
|
||||
"type": "math",
|
||||
"expression": "2 + 3 > 1"
|
||||
@@ -274,7 +275,7 @@ func TestIntegrationAdminConfiguration_SendingToExternalAlertmanagers(t *testing
|
||||
_ = postRequest(t, ruleURL, buf.String(), http.StatusAccepted)
|
||||
}
|
||||
|
||||
//Eventually, our Alertmanagers should receiver the alert.
|
||||
// Eventually, our Alertmanagers should receiver the alert.
|
||||
{
|
||||
require.Eventually(t, func() bool {
|
||||
return fakeAM1.AlertsCount() == 1 && fakeAM2.AlertsCount() == 1
|
||||
|
||||
Reference in New Issue
Block a user