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:
Will Browne
2025-05-28 11:25:01 +01:00
committed by GitHub
parent 10f2b76156
commit edb0865caa
31 changed files with 95 additions and 501 deletions
@@ -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{