[v9.4.x] Chore: Remove CreateUserForTests() (#64125) (#64165)

Chore: Remove CreateUserForTests() (#64125)

* Chore: Remove CreateUserForTests

* Apply suggestion from code review

(cherry picked from commit e6e8351ee9)
This commit is contained in:
Sofia Papagiannaki
2023-03-03 18:43:10 +02:00
committed by GitHub
parent 5014df0521
commit 8c12f75b0b
27 changed files with 236 additions and 297 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ func TestIntegrationPrometheus(t *testing.T) {
grafanaListeningAddr, testEnv := testinfra.StartGrafanaEnv(t, dir, path)
ctx := context.Background()
testinfra.CreateUser(t, testEnv.SQLStore, user.CreateUserCommand{
u := testinfra.CreateUser(t, testEnv.SQLStore, user.CreateUserCommand{
DefaultOrgRole: string(org.RoleAdmin),
Password: "admin",
Login: "admin",
@@ -56,7 +56,7 @@ func TestIntegrationPrometheus(t *testing.T) {
uid := "prometheus"
err := testEnv.Server.HTTPServer.DataSourcesService.AddDataSource(ctx, &datasources.AddDataSourceCommand{
OrgId: 1,
OrgId: u.OrgID,
Access: datasources.DS_ACCESS_PROXY,
Name: "Prometheus",
Type: datasources.DS_PROMETHEUS,