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:
@@ -23,8 +23,8 @@ func TestIntegrationCreateCorrelation(t *testing.T) {
|
||||
|
||||
adminUser := ctx.createUser(user.CreateUserCommand{
|
||||
DefaultOrgRole: string(org.RoleAdmin),
|
||||
Password: "admin",
|
||||
Login: "admin",
|
||||
Password: "admin2",
|
||||
Login: "admin2",
|
||||
})
|
||||
|
||||
editorUser := ctx.createUser(user.CreateUserCommand{
|
||||
|
||||
@@ -23,8 +23,8 @@ func TestIntegrationDeleteCorrelation(t *testing.T) {
|
||||
|
||||
adminUser := ctx.createUser(user.CreateUserCommand{
|
||||
DefaultOrgRole: string(org.RoleAdmin),
|
||||
Password: "admin",
|
||||
Login: "admin",
|
||||
Password: "admin2",
|
||||
Login: "admin2",
|
||||
})
|
||||
|
||||
editorUser := ctx.createUser(user.CreateUserCommand{
|
||||
|
||||
@@ -23,8 +23,8 @@ func TestIntegrationCreateOrUpdateCorrelation(t *testing.T) {
|
||||
|
||||
adminUser := ctx.createUser(user.CreateUserCommand{
|
||||
DefaultOrgRole: string(org.RoleAdmin),
|
||||
Password: "admin",
|
||||
Login: "admin",
|
||||
Password: "admin2",
|
||||
Login: "admin2",
|
||||
})
|
||||
|
||||
createDsCommand := &datasources.AddDataSourceCommand{
|
||||
|
||||
@@ -25,15 +25,15 @@ func TestIntegrationReadCorrelation(t *testing.T) {
|
||||
|
||||
adminUser := ctx.createUser(user.CreateUserCommand{
|
||||
DefaultOrgRole: string(org.RoleAdmin),
|
||||
Password: "admin",
|
||||
Login: "admin",
|
||||
Password: "admin2",
|
||||
Login: "admin2",
|
||||
})
|
||||
|
||||
otherOrgId := ctx.createOrg("New organization")
|
||||
otherOrgUser := ctx.createUser(user.CreateUserCommand{
|
||||
DefaultOrgRole: string(org.RoleAdmin),
|
||||
Password: "admin2",
|
||||
Login: "admin2",
|
||||
Password: "admin3",
|
||||
Login: "admin3",
|
||||
OrgID: otherOrgId,
|
||||
})
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestIntegrationUpdateCorrelation(t *testing.T) {
|
||||
adminUser := ctx.createUser(user.CreateUserCommand{
|
||||
DefaultOrgRole: string(org.RoleAdmin),
|
||||
Password: "admin",
|
||||
Login: "admin",
|
||||
Login: "admin2",
|
||||
})
|
||||
|
||||
editorUser := ctx.createUser(user.CreateUserCommand{
|
||||
|
||||
Reference in New Issue
Block a user