Chore: Remove CreateUserForTests() (#64125)
* Chore: Remove CreateUserForTests * Apply suggestion from code review
This commit is contained in:
@@ -31,7 +31,7 @@ func TestIntegrationGraphite(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",
|
||||
@@ -55,7 +55,7 @@ func TestIntegrationGraphite(t *testing.T) {
|
||||
|
||||
uid := "graphite"
|
||||
_, err := testEnv.Server.HTTPServer.DataSourcesService.AddDataSource(ctx, &datasources.AddDataSourceCommand{
|
||||
OrgID: 1,
|
||||
OrgID: u.OrgID,
|
||||
Access: datasources.DS_ACCESS_PROXY,
|
||||
Name: "graphite",
|
||||
Type: datasources.DS_GRAPHITE,
|
||||
|
||||
Reference in New Issue
Block a user