From 19cc787a4a4701f9ebda52f456ceb0d3e46878a8 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Fri, 20 Sep 2024 13:01:44 +0200 Subject: [PATCH] rename coopsharestransactions->coopsharetx --- .../HsOfficeCoopSharesTransactionEntity.java | 2 +- .../hsadminng/rbac/generator/RbacView.java | 2 +- .../5110-hs-office-coopshares.sql | 12 ++-- .../5113-hs-office-coopshares-rbac.sql | 62 +++++++++---------- .../5116-hs-office-coopshares-migration.sql | 8 +-- .../5118-hs-office-coopshares-test-data.sql | 2 +- .../hsadminng/hs/migration/CsvDataImport.java | 2 +- ...esTransactionControllerAcceptanceTest.java | 4 +- ...sTransactionRepositoryIntegrationTest.java | 30 ++++----- ...ceMembershipRepositoryIntegrationTest.java | 2 +- src/test/resources/application.yml | 2 +- 11 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionEntity.java b/src/main/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionEntity.java index d8486008..2bbf287d 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionEntity.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionEntity.java @@ -32,7 +32,7 @@ import static net.hostsharing.hsadminng.rbac.generator.RbacView.rbacViewFor; import static net.hostsharing.hsadminng.stringify.Stringify.stringify; @Entity -@Table(schema = "hs_office", name = "coopsharestransaction_rv") +@Table(schema = "hs_office", name = "coopsharetx_rv") @Getter @Setter @Builder diff --git a/src/main/java/net/hostsharing/hsadminng/rbac/generator/RbacView.java b/src/main/java/net/hostsharing/hsadminng/rbac/generator/RbacView.java index ec95cc2b..07838dad 100644 --- a/src/main/java/net/hostsharing/hsadminng/rbac/generator/RbacView.java +++ b/src/main/java/net/hostsharing/hsadminng/rbac/generator/RbacView.java @@ -987,7 +987,7 @@ public class RbacView { String getRawTableShortName() { // TODO.impl: some combined function and trigger names are too long - // maybe we should shorten the table name e.g. hs_office.coopsharestransaction -> hsof.coopsharetx + // maybe we should shorten the table name e.g. hs_office.coopsharetx -> hsof.coopsharetx // this is just a workaround: return getRawTableName() .replace("hs_office.", "hsof.") diff --git a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5110-hs-office-coopshares.sql b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5110-hs-office-coopshares.sql index ade1156a..213dd1cb 100644 --- a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5110-hs-office-coopshares.sql +++ b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5110-hs-office-coopshares.sql @@ -8,7 +8,7 @@ CREATE TYPE hs_office.CoopSharesTransactionType AS ENUM ('ADJUSTMENT', 'SUBSCRIP CREATE CAST (character varying as hs_office.CoopSharesTransactionType) WITH INOUT AS IMPLICIT; -create table if not exists hs_office.coopsharestransaction +create table if not exists hs_office.coopsharetx ( uuid uuid unique references rbac.object (uuid) initially deferred, version int not null default 0, @@ -17,7 +17,7 @@ create table if not exists hs_office.coopsharestransaction valueDate date not null, shareCount integer not null, reference varchar(48) not null, - adjustedShareTxUuid uuid unique REFERENCES hs_office.coopsharestransaction(uuid) DEFERRABLE INITIALLY DEFERRED, + adjustedShareTxUuid uuid unique REFERENCES hs_office.coopsharetx(uuid) DEFERRABLE INITIALLY DEFERRED, comment varchar(512) ); --// @@ -26,7 +26,7 @@ create table if not exists hs_office.coopsharestransaction --changeset michael.hoennig:hs-office-coopshares-BUSINESS-RULES endDelimiter:--// -- ---------------------------------------------------------------------------- -alter table hs_office.coopsharestransaction +alter table hs_office.coopsharetx add constraint reverse_entry_missing check ( transactionType = 'ADJUSTMENT' and adjustedShareTxUuid is not null or transactionType <> 'ADJUSTMENT' and adjustedShareTxUuid is null); @@ -44,7 +44,7 @@ declare totalShareCount integer; begin select sum(cst.shareCount) - from hs_office.coopsharestransaction cst + from hs_office.coopsharetx cst where cst.membershipUuid = forMembershipUuid into currentShareCount; totalShareCount := currentShareCount + newShareCount; @@ -54,7 +54,7 @@ begin return true; end; $$; -alter table hs_office.coopsharestransaction +alter table hs_office.coopsharetx add constraint check_positive_total_shares_count check ( hs_office.coopsharestx_check_positive_total(membershipUuid, shareCount) ); @@ -64,5 +64,5 @@ alter table hs_office.coopsharestransaction --changeset michael.hoennig:hs-office-coopshares-MAIN-TABLE-JOURNAL endDelimiter:--// -- ---------------------------------------------------------------------------- -call base.create_journal('hs_office.coopsharestransaction'); +call base.create_journal('hs_office.coopsharetx'); --// diff --git a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5113-hs-office-coopshares-rbac.sql b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5113-hs-office-coopshares-rbac.sql index dabbe8f6..33ea130c 100644 --- a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5113-hs-office-coopshares-rbac.sql +++ b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5113-hs-office-coopshares-rbac.sql @@ -3,29 +3,29 @@ -- ============================================================================ ---changeset RbacObjectGenerator:hs-office-coopsharestransaction-rbac-OBJECT endDelimiter:--// +--changeset RbacObjectGenerator:hs-office-coopsharetx-rbac-OBJECT endDelimiter:--// -- ---------------------------------------------------------------------------- -call rbac.generateRelatedRbacObject('hs_office.coopsharestransaction'); +call rbac.generateRelatedRbacObject('hs_office.coopsharetx'); --// -- ============================================================================ ---changeset RbacRoleDescriptorsGenerator:hs-office-coopsharestransaction-rbac-ROLE-DESCRIPTORS endDelimiter:--// +--changeset RbacRoleDescriptorsGenerator:hs-office-coopsharetx-rbac-ROLE-DESCRIPTORS endDelimiter:--// -- ---------------------------------------------------------------------------- -call rbac.generateRbacRoleDescriptors('hs_office.coopsharestransaction'); +call rbac.generateRbacRoleDescriptors('hs_office.coopsharetx'); --// -- ============================================================================ ---changeset RolesGrantsAndPermissionsGenerator:hs-office-coopsharestransaction-rbac-insert-trigger endDelimiter:--// +--changeset RolesGrantsAndPermissionsGenerator:hs-office-coopsharetx-rbac-insert-trigger endDelimiter:--// -- ---------------------------------------------------------------------------- /* Creates the roles, grants and permission for the AFTER INSERT TRIGGER. */ -create or replace procedure hs_office.coopsharestransaction_build_rbac_system( - NEW hs_office.coopsharestransaction +create or replace procedure hs_office.coopsharetx_build_rbac_system( + NEW hs_office.coopsharetx ) language plpgsql as $$ @@ -45,52 +45,52 @@ begin end; $$; /* - AFTER INSERT TRIGGER to create the role+grant structure for a new hs_office.coopsharestransaction row. + AFTER INSERT TRIGGER to create the role+grant structure for a new hs_office.coopsharetx row. */ -create or replace function hs_office.coopsharestransaction_build_rbac_system_after_insert_tf() +create or replace function hs_office.coopsharetx_build_rbac_system_after_insert_tf() returns trigger language plpgsql strict as $$ begin - call hs_office.coopsharestransaction_build_rbac_system(NEW); + call hs_office.coopsharetx_build_rbac_system(NEW); return NEW; end; $$; create trigger build_rbac_system_after_insert_tg - after insert on hs_office.coopsharestransaction + after insert on hs_office.coopsharetx for each row -execute procedure hs_office.coopsharestransaction_build_rbac_system_after_insert_tf(); +execute procedure hs_office.coopsharetx_build_rbac_system_after_insert_tf(); --// -- ============================================================================ ---changeset InsertTriggerGenerator:hs-office-coopsharestransaction-rbac-GRANTING-INSERT-PERMISSION endDelimiter:--// +--changeset InsertTriggerGenerator:hs-office-coopsharetx-rbac-GRANTING-INSERT-PERMISSION endDelimiter:--// -- ---------------------------------------------------------------------------- -- granting INSERT permission to hs_office.membership ---------------------------- /* - Grants INSERT INTO hs_office.coopsharestransaction permissions to specified role of pre-existing hs_office.membership rows. + Grants INSERT INTO hs_office.coopsharetx permissions to specified role of pre-existing hs_office.membership rows. */ do language plpgsql $$ declare row hs_office.membership; begin - call base.defineContext('create INSERT INTO hs_office.coopsharestransaction permissions for pre-exising hs_office.membership rows'); + call base.defineContext('create INSERT INTO hs_office.coopsharetx permissions for pre-exising hs_office.membership rows'); FOR row IN SELECT * FROM hs_office.membership -- unconditional for all rows in that table LOOP call rbac.grantPermissionToRole( - rbac.createPermission(row.uuid, 'INSERT', 'hs_office.coopsharestransaction'), + rbac.createPermission(row.uuid, 'INSERT', 'hs_office.coopsharetx'), hs_office.membership_ADMIN(row)); END LOOP; end; $$; /** - Grants hs_office.coopsharestransaction INSERT permission to specified role of new membership rows. + Grants hs_office.coopsharetx INSERT permission to specified role of new membership rows. */ create or replace function hs_office.new_coopsharetx_grants_insert_to_membership_tf() returns trigger @@ -99,53 +99,53 @@ create or replace function hs_office.new_coopsharetx_grants_insert_to_membership begin -- unconditional for all rows in that table call rbac.grantPermissionToRole( - rbac.createPermission(NEW.uuid, 'INSERT', 'hs_office.coopsharestransaction'), + rbac.createPermission(NEW.uuid, 'INSERT', 'hs_office.coopsharetx'), hs_office.membership_ADMIN(NEW)); -- end. return NEW; end; $$; -- z_... is to put it at the end of after insert triggers, to make sure the roles exist -create trigger z_new_coopsharestransaction_grants_after_insert_tg +create trigger z_new_coopsharetx_grants_after_insert_tg after insert on hs_office.membership for each row execute procedure hs_office.new_coopsharetx_grants_insert_to_membership_tf(); -- ============================================================================ ---changeset InsertTriggerGenerator:hs-office-coopsharestransaction-rbac-CHECKING-INSERT-PERMISSION endDelimiter:--// +--changeset InsertTriggerGenerator:hs-office-coopsharetx-rbac-CHECKING-INSERT-PERMISSION endDelimiter:--// -- ---------------------------------------------------------------------------- /** - Checks if the user respectively the assumed roles are allowed to insert a row to hs_office.coopsharestransaction. + Checks if the user respectively the assumed roles are allowed to insert a row to hs_office.coopsharetx. */ -create or replace function hs_office.coopsharestransaction_insert_permission_check_tf() +create or replace function hs_office.coopsharetx_insert_permission_check_tf() returns trigger language plpgsql as $$ declare superObjectUuid uuid; begin -- check INSERT permission via direct foreign key: NEW.membershipUuid - if rbac.hasInsertPermission(NEW.membershipUuid, 'hs_office.coopsharestransaction') then + if rbac.hasInsertPermission(NEW.membershipUuid, 'hs_office.coopsharetx') then return NEW; end if; - raise exception '[403] insert into hs_office.coopsharestransaction values(%) not allowed for current subjects % (%)', + raise exception '[403] insert into hs_office.coopsharetx values(%) not allowed for current subjects % (%)', NEW, base.currentSubjects(), rbac.currentSubjectOrAssumedRolesUuids(); end; $$; -create trigger coopsharestransaction_insert_permission_check_tg - before insert on hs_office.coopsharestransaction +create trigger coopsharetx_insert_permission_check_tg + before insert on hs_office.coopsharetx for each row - execute procedure hs_office.coopsharestransaction_insert_permission_check_tf(); + execute procedure hs_office.coopsharetx_insert_permission_check_tf(); --// -- ============================================================================ ---changeset RbacIdentityViewGenerator:hs-office-coopsharestransaction-rbac-IDENTITY-VIEW endDelimiter:--// +--changeset RbacIdentityViewGenerator:hs-office-coopsharetx-rbac-IDENTITY-VIEW endDelimiter:--// -- ---------------------------------------------------------------------------- -call rbac.generateRbacIdentityViewFromProjection('hs_office.coopsharestransaction', +call rbac.generateRbacIdentityViewFromProjection('hs_office.coopsharetx', $idName$ reference $idName$); @@ -153,9 +153,9 @@ call rbac.generateRbacIdentityViewFromProjection('hs_office.coopsharestransactio -- ============================================================================ ---changeset RbacRestrictedViewGenerator:hs-office-coopsharestransaction-rbac-RESTRICTED-VIEW endDelimiter:--// +--changeset RbacRestrictedViewGenerator:hs-office-coopsharetx-rbac-RESTRICTED-VIEW endDelimiter:--// -- ---------------------------------------------------------------------------- -call rbac.generateRbacRestrictedView('hs_office.coopsharestransaction', +call rbac.generateRbacRestrictedView('hs_office.coopsharetx', $orderBy$ reference $orderBy$, diff --git a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5116-hs-office-coopshares-migration.sql b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5116-hs-office-coopshares-migration.sql index 1aaf2f0a..1e4efb42 100644 --- a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5116-hs-office-coopshares-migration.sql +++ b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5116-hs-office-coopshares-migration.sql @@ -9,7 +9,7 @@ CREATE TABLE hs_office.coopsharestransaction_legacy_id ( - uuid uuid NOT NULL REFERENCES hs_office.coopsharestransaction(uuid), + uuid uuid NOT NULL REFERENCES hs_office.coopsharetx(uuid), member_share_id integer NOT NULL ); --// @@ -42,7 +42,7 @@ ALTER TABLE hs_office.coopsharestransaction_legacy_id CALL base.defineContext('schema-migration'); INSERT INTO hs_office.coopsharestransaction_legacy_id(uuid, member_share_id) - SELECT uuid, nextVal('hs_office.coopsharestransaction_legacy_id_seq') FROM hs_office.coopsharestransaction; + SELECT uuid, nextVal('hs_office.coopsharestransaction_legacy_id_seq') FROM hs_office.coopsharetx; --/ @@ -65,7 +65,7 @@ begin end; $$; create trigger insert_legacy_id_mapping_tg - after insert on hs_office.coopsharestransaction + after insert on hs_office.coopsharetx for each row execute procedure hs_office.coopsharetx_insert_legacy_id_mapping_tf(); --/ @@ -90,7 +90,7 @@ begin end; $$; create trigger delete_legacy_id_mapping_tg - before delete on hs_office.coopsharestransaction + before delete on hs_office.coopsharetx for each row execute procedure hs_office.coopsharetx_delete_legacy_id_mapping_tf(); --/ diff --git a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5118-hs-office-coopshares-test-data.sql b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5118-hs-office-coopshares-test-data.sql index 9769be94..0f148a90 100644 --- a/src/main/resources/db/changelog/5-hs-office/511-coopshares/5118-hs-office-coopshares-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/511-coopshares/5118-hs-office-coopshares-test-data.sql @@ -27,7 +27,7 @@ begin raise notice 'creating test coopSharesTransaction: %', givenPartnerNumber::text || givenMemberNumberSuffix; subscriptionEntryUuid := uuid_generate_v4(); insert - into hs_office.coopsharestransaction(uuid, membershipuuid, transactiontype, valuedate, sharecount, reference, comment, adjustedShareTxUuid) + into hs_office.coopsharetx(uuid, membershipuuid, transactiontype, valuedate, sharecount, reference, comment, adjustedShareTxUuid) values (uuid_generate_v4(), membership.uuid, 'SUBSCRIPTION', '2010-03-15', 4, 'ref '||givenPartnerNumber::text || givenMemberNumberSuffix||'-1', 'initial subscription', null), (uuid_generate_v4(), membership.uuid, 'CANCELLATION', '2021-09-01', -2, 'ref '||givenPartnerNumber::text || givenMemberNumberSuffix||'-2', 'cancelling some', null), diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/CsvDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/CsvDataImport.java index 8a4500a1..7f1ac1f2 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/CsvDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/CsvDataImport.java @@ -256,7 +256,7 @@ public class CsvDataImport extends ContextBasedTest { em.createNativeQuery("delete from hs_booking.project_ex where true").executeUpdate(); em.createNativeQuery("delete from hs_office.coopassettx where true").executeUpdate(); em.createNativeQuery("delete from hs_office.coopassettx_legacy_id where true").executeUpdate(); - em.createNativeQuery("delete from hs_office.coopsharestransaction where true").executeUpdate(); + em.createNativeQuery("delete from hs_office.coopsharetx where true").executeUpdate(); em.createNativeQuery("delete from hs_office.coopsharestransaction_legacy_id where true").executeUpdate(); em.createNativeQuery("delete from hs_office.membership where true").executeUpdate(); em.createNativeQuery("delete from hs_office.sepamandate where true").executeUpdate(); diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionControllerAcceptanceTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionControllerAcceptanceTest.java index a379c415..28a7723e 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionControllerAcceptanceTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionControllerAcceptanceTest.java @@ -55,9 +55,9 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest extends ContextBased void cleanup() { jpaAttempt.transacted(() -> { context.define("superuser-alex@hostsharing.net", null); - // HsOfficeCoopSharesTransactionEntity respectively hs_office.coopsharestransaction_rv + // HsOfficeCoopSharesTransactionEntity respectively hs_office.coopsharetx_rv // cannot be deleted at all, but the underlying table record can be deleted. - em.createNativeQuery("delete from hs_office.coopsharestransaction where reference like 'temp %'").executeUpdate(); + em.createNativeQuery("delete from hs_office.coopsharetx where reference like 'temp %'").executeUpdate(); }).assertSuccessful(); } diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionRepositoryIntegrationTest.java index 6ef36d57..ac74bee6 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionRepositoryIntegrationTest.java @@ -111,8 +111,8 @@ class HsOfficeCoopSharesTransactionRepositoryIntegrationTest extends ContextBase .map(s -> s.replace("hs_office.", "")) .containsExactlyInAnyOrder(Array.fromFormatted( initialGrantNames, - "{ grant perm:coopsharestransaction#temprefB:SELECT to role:membership#M-1000101:AGENT by system and assume }", - "{ grant perm:coopsharestransaction#temprefB:UPDATE to role:membership#M-1000101:ADMIN by system and assume }", + "{ grant perm:coopsharetx#temprefB:SELECT to role:membership#M-1000101:AGENT by system and assume }", + "{ grant perm:coopsharetx#temprefB:UPDATE to role:membership#M-1000101:ADMIN by system and assume }", null)); } @@ -221,7 +221,7 @@ class HsOfficeCoopSharesTransactionRepositoryIntegrationTest extends ContextBase final var query = em.createNativeQuery(""" select currentTask, targetTable, targetOp, targetdelta->>'reference' from base.tx_journal_v - where targettable = 'hs_office.coopsharestransaction'; + where targettable = 'hs_office.coopsharetx'; """); // when @@ -229,18 +229,18 @@ class HsOfficeCoopSharesTransactionRepositoryIntegrationTest extends ContextBase // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000101-1]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000101-2]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000101-3]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000101-4]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000202-1]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000202-2]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000202-3]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000202-4]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000303-1]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000303-2]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000303-3]", - "[creating coopSharesTransaction test-data, hs_office.coopsharestransaction, INSERT, ref 1000303-4]"); + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000101-1]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000101-2]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000101-3]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000101-4]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000202-1]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000202-2]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000202-3]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000202-4]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000303-1]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000303-2]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000303-3]", + "[creating coopSharesTransaction test-data, hs_office.coopsharetx, INSERT, ref 1000303-4]"); } @BeforeEach diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/membership/HsOfficeMembershipRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/membership/HsOfficeMembershipRepositoryIntegrationTest.java index ddceb536..0929f370 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/membership/HsOfficeMembershipRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/membership/HsOfficeMembershipRepositoryIntegrationTest.java @@ -119,7 +119,7 @@ class HsOfficeMembershipRepositoryIntegrationTest extends ContextBasedTestWithCl initialGrantNames, // insert "{ grant perm:membership#M-1000117:INSERT>coopassettx to role:membership#M-1000117:ADMIN by system and assume }", - "{ grant perm:membership#M-1000117:INSERT>coopsharestransaction to role:membership#M-1000117:ADMIN by system and assume }", + "{ grant perm:membership#M-1000117:INSERT>coopsharetx to role:membership#M-1000117:ADMIN by system and assume }", // owner "{ grant perm:membership#M-1000117:DELETE to role:membership#M-1000117:ADMIN by system and assume }", diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml index 923c62e9..b4945a0f 100644 --- a/src/test/resources/application.yml +++ b/src/test/resources/application.yml @@ -7,7 +7,7 @@ spring: url-tc: jdbc:tc:postgresql:15.5-bookworm:///spring_boot_testcontainers url-tcx: jdbc:tc:postgresql:15.5-bookworm:///spring_boot_testcontainers?TC_REUSABLE=true&TC_DAEMON=true url-local: jdbc:postgresql://localhost:5432/postgres - url: ${spring.datasource.url-tc} + url: ${spring.datasource.url-local} username: postgres password: password