Chore: Ensure we save correct default admin user in integration test DB setup (#105752)
* fix helper + amend tests * fix import + remove unused var * remove more users * remove unused code * update test comment
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
apimodels "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
|
||||
ngmodels "github.com/grafana/grafana/pkg/services/ngalert/models"
|
||||
"github.com/grafana/grafana/pkg/services/org"
|
||||
"github.com/grafana/grafana/pkg/services/user"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/tests/testinfra"
|
||||
@@ -48,12 +47,6 @@ func TestGrafanaRuleConfig(t *testing.T) {
|
||||
|
||||
grafanaListedAddr, env := testinfra.StartGrafanaEnv(t, dir, path)
|
||||
|
||||
userId := createUser(t, env.SQLStore, env.Cfg, user.CreateUserCommand{
|
||||
DefaultOrgRole: string(org.RoleAdmin),
|
||||
Password: "admin",
|
||||
Login: "admin",
|
||||
})
|
||||
|
||||
apiCli := newAlertingApiClient(grafanaListedAddr, "admin", "admin")
|
||||
|
||||
apiCli.CreateFolder(t, "NamespaceUID", "NamespaceTitle")
|
||||
@@ -63,7 +56,7 @@ func TestGrafanaRuleConfig(t *testing.T) {
|
||||
Type: "testdata",
|
||||
Access: datasources.DS_ACCESS_PROXY,
|
||||
UID: TESTDATA_UID,
|
||||
UserID: userId,
|
||||
UserID: 1,
|
||||
OrgID: 1,
|
||||
}
|
||||
_, err := env.Server.HTTPServer.DataSourcesService.AddDataSource(context.Background(), dsCmd)
|
||||
|
||||
Reference in New Issue
Block a user