Skip to content

Commit e551df8

Browse files
fix test due to ACL update in commons
1 parent 97b4e2e commit e551df8

File tree

2 files changed

+7
-27
lines changed

2 files changed

+7
-27
lines changed

organization/src/integrationTest/kotlin/com/cosmotech/organization/service/OrganizationServiceIntegrationTest.kt

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
361361
component = "organization",
362362
roles =
363363
mutableMapOf(
364+
ROLE_NONE to mutableListOf<String>(),
364365
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
365366
ROLE_USER to
366367
mutableListOf(
@@ -386,6 +387,7 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
386387
component = "workspace",
387388
roles =
388389
mutableMapOf(
390+
ROLE_NONE to mutableListOf<String>(),
389391
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
390392
ROLE_USER to
391393
mutableListOf(
@@ -411,6 +413,7 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
411413
component = "runner",
412414
roles =
413415
mutableMapOf(
416+
ROLE_NONE to mutableListOf<String>(),
414417
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
415418
ROLE_EDITOR to
416419
mutableListOf(
@@ -744,19 +747,6 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
744747
}
745748
}
746749

747-
@Test
748-
fun `createOrganizationAccessControl as resource admin (ROLE_NONE)`() {
749-
assertThrows<CsmClientException> {
750-
val name = "o-connector-test-1"
751-
val organizationRegistered =
752-
organizationApiService.createOrganization(makeSimpleOrganizationCreateRequest(name))
753-
754-
val otherUserACL = OrganizationAccessControl(id = OTHER_TEST_USER_ID, role = ROLE_NONE)
755-
organizationApiService.createOrganizationAccessControl(
756-
organizationRegistered.id, otherUserACL)
757-
}
758-
}
759-
760750
@Test
761751
fun `createOrganizationAccessControl as not resource admin and PERMISSION_WRITE_SECURITY`() {
762752
assertDoesNotThrow {
@@ -1329,6 +1319,7 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
13291319
component = "organization",
13301320
roles =
13311321
mutableMapOf(
1322+
ROLE_NONE to mutableListOf<String>(),
13321323
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
13331324
ROLE_USER to
13341325
mutableListOf(
@@ -1354,6 +1345,7 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
13541345
component = "workspace",
13551346
roles =
13561347
mutableMapOf(
1348+
ROLE_NONE to mutableListOf<String>(),
13571349
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
13581350
ROLE_USER to
13591351
mutableListOf(
@@ -1379,6 +1371,7 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
13791371
component = "runner",
13801372
roles =
13811373
mutableMapOf(
1374+
ROLE_NONE to mutableListOf<String>(),
13821375
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
13831376
ROLE_EDITOR to
13841377
mutableListOf(
@@ -1771,19 +1764,6 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
17711764
}
17721765
}
17731766

1774-
@Test
1775-
fun `createOrganizationAccessControl as resource admin (ROLE_NONE)`() {
1776-
assertThrows<CsmClientException> {
1777-
val name = "o-connector-test-1"
1778-
val organizationRegistered =
1779-
organizationApiService.createOrganization(makeSimpleOrganizationCreateRequest(name))
1780-
1781-
val otherUserACL = OrganizationAccessControl(id = OTHER_TEST_USER_ID, role = ROLE_NONE)
1782-
organizationApiService.createOrganizationAccessControl(
1783-
organizationRegistered.id, otherUserACL)
1784-
}
1785-
}
1786-
17871767
@Test
17881768
fun `createOrganizationAccessControl as not resource admin and PERMISSION_WRITE_SECURITY`() {
17891769
assertDoesNotThrow {

organization/src/integrationTest/kotlin/com/cosmotech/organization/service/OrganizationServiceRBACTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,11 @@ class OrganizationServiceRBACTest : CsmTestBase() {
425425
@TestFactory
426426
fun `test RBAC listOrganizationSecurityUsers`() =
427427
mapOf(
428+
ROLE_NONE to true,
428429
ROLE_VIEWER to true,
429430
ROLE_EDITOR to false,
430431
ROLE_VALIDATOR to true,
431432
ROLE_USER to false,
432-
ROLE_NONE to true,
433433
ROLE_ADMIN to false,
434434
)
435435
.map { (role, shouldThrow) ->

0 commit comments

Comments
 (0)