diff --git a/src/main/resources/db/changelog/2-test/201-test-customer/2018-test-customer-test-data.sql b/src/main/resources/db/changelog/2-test/201-test-customer/2018-test-customer-test-data.sql index 73c8e535..f05cbafb 100644 --- a/src/main/resources/db/changelog/2-test/201-test-customer/2018-test-customer-test-data.sql +++ b/src/main/resources/db/changelog/2-test/201-test-customer/2018-test-customer-test-data.sql @@ -25,16 +25,11 @@ create or replace procedure createTestCustomerTestData( ) language plpgsql as $$ declare - currentTask varchar; custRowId uuid; custAdminName varchar; custAdminUuid uuid; newCust test_customer; begin - currentTask = 'creating RBAC test customer #' || custReference || '/' || custPrefix; - call defineContext(currentTask, null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); - execute format('set local hsadminng.currentTask to %L', currentTask); - custRowId = uuid_generate_v4(); custAdminName = 'customer-admin@' || custPrefix || '.example.com'; custAdminUuid = createRbacUser(custAdminName); @@ -77,6 +72,8 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating RBAC test customer', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); + call createTestCustomerTestData(99901, 'xxx'); call createTestCustomerTestData(99902, 'yyy'); call createTestCustomerTestData(99903, 'zzz'); diff --git a/src/main/resources/db/changelog/2-test/202-test-package/2028-test-package-test-data.sql b/src/main/resources/db/changelog/2-test/202-test-package/2028-test-package-test-data.sql index f50ad480..bf4a9f3b 100644 --- a/src/main/resources/db/changelog/2-test/202-test-package/2028-test-package-test-data.sql +++ b/src/main/resources/db/changelog/2-test/202-test-package/2028-test-package-test-data.sql @@ -13,7 +13,6 @@ declare custAdminUser varchar; custAdminRole varchar; pacName varchar; - currentTask varchar; pac test_package; begin select * from test_customer where test_customer.prefix = customerPrefix into cust; @@ -21,13 +20,9 @@ begin for t in 0..(pacCount-1) loop pacName = cust.prefix || to_char(t, 'fm00'); - currentTask = 'creating RBAC test package #' || pacName || ' for customer ' || cust.prefix || ' #' || - cust.uuid; - custAdminUser = 'customer-admin@' || cust.prefix || '.example.com'; custAdminRole = 'test_customer#' || cust.prefix || ':ADMIN'; - call defineContext(currentTask, null, 'superuser-fran@hostsharing.net', custAdminRole); - raise notice 'task: % by % as %', currentTask, custAdminUser, custAdminRole; + call defineContext('creating RBAC test package', null, 'superuser-fran@hostsharing.net', custAdminRole); insert into test_package (customerUuid, name, description) diff --git a/src/main/resources/db/changelog/2-test/203-test-domain/2038-test-domain-test-data.sql b/src/main/resources/db/changelog/2-test/203-test-domain/2038-test-domain-test-data.sql index 47326f49..e2aa870f 100644 --- a/src/main/resources/db/changelog/2-test/203-test-domain/2038-test-domain-test-data.sql +++ b/src/main/resources/db/changelog/2-test/203-test-domain/2038-test-domain-test-data.sql @@ -11,7 +11,6 @@ create or replace procedure createdomainTestData( packageName varchar, domainCou declare pac record; pacAdmin varchar; - currentTask varchar; begin select p.uuid, p.name, c.prefix as custPrefix from test_package p @@ -21,10 +20,8 @@ begin for t in 0..(domainCount-1) loop - currentTask = 'creating RBAC test domain #' || t || ' for package ' || pac.name || ' #' || pac.uuid; - raise notice 'task: %', currentTask; pacAdmin = 'pac-admin-' || pac.name || '@' || pac.custPrefix || '.example.com'; - call defineContext(currentTask, null, pacAdmin, null); + call defineContext('creating RBAC test domain', null, pacAdmin, null); insert into test_domain (name, packageUuid) diff --git a/src/main/resources/db/changelog/5-hs-office/501-contact/5018-hs-office-contact-test-data.sql b/src/main/resources/db/changelog/5-hs-office/501-contact/5018-hs-office-contact-test-data.sql index 3504eaaa..fbee80ad 100644 --- a/src/main/resources/db/changelog/5-hs-office/501-contact/5018-hs-office-contact-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/501-contact/5018-hs-office-contact-test-data.sql @@ -11,17 +11,13 @@ create or replace procedure createHsOfficeContactTestData(contCaption varchar) language plpgsql as $$ declare - currentTask varchar; postalAddr varchar; emailAddr varchar; begin - currentTask = 'creating contact test-data ' || contCaption; - execute format('set local hsadminng.currentTask to %L', currentTask); - emailAddr = 'contact-admin@' || cleanIdentifier(contCaption) || '.example.com'; - call defineContext(currentTask); + call defineContext('creating contact test-data'); perform createRbacUser(emailAddr); - call defineContext(currentTask, null, emailAddr); + call defineContext('creating contact test-data', null, emailAddr); postalAddr := E'Vorname Nachname\nStraße Hnr\nPLZ Stadt'; diff --git a/src/main/resources/db/changelog/5-hs-office/502-person/5028-hs-office-person-test-data.sql b/src/main/resources/db/changelog/5-hs-office/502-person/5028-hs-office-person-test-data.sql index 775ecaa6..8900886c 100644 --- a/src/main/resources/db/changelog/5-hs-office/502-person/5028-hs-office-person-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/502-person/5028-hs-office-person-test-data.sql @@ -17,16 +17,13 @@ create or replace procedure createHsOfficePersonTestData( language plpgsql as $$ declare fullName varchar; - currentTask varchar; emailAddr varchar; begin fullName := concat_ws(', ', newTradeName, newFamilyName, newGivenName); - currentTask = 'creating person test-data ' || fullName; emailAddr = 'person-' || left(cleanIdentifier(fullName), 32) || '@example.com'; - call defineContext(currentTask); + call defineContext('creating person test-data'); perform createRbacUser(emailAddr); - call defineContext(currentTask, null, emailAddr); - execute format('set local hsadminng.currentTask to %L', currentTask); + call defineContext('creating person test-data', null, emailAddr); raise notice 'creating test person: % by %', fullName, emailAddr; insert diff --git a/src/main/resources/db/changelog/5-hs-office/503-relation/5038-hs-office-relation-test-data.sql b/src/main/resources/db/changelog/5-hs-office/503-relation/5038-hs-office-relation-test-data.sql index cff9f3f3..120ffe62 100644 --- a/src/main/resources/db/changelog/5-hs-office/503-relation/5038-hs-office-relation-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/503-relation/5038-hs-office-relation-test-data.sql @@ -16,7 +16,6 @@ create or replace procedure createHsOfficeRelationTestData( mark varchar default null) language plpgsql as $$ declare - currentTask varchar; idName varchar; anchorPerson hs_office_person; holderPerson hs_office_person; @@ -24,9 +23,6 @@ declare begin idName := cleanIdentifier( anchorPersonName || '-' || holderPersonName); - currentTask := 'creating relation test-data ' || idName; - call defineContext(currentTask, null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); - execute format('set local hsadminng.currentTask to %L', currentTask); select p.* into anchorPerson @@ -89,6 +85,8 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating relation test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); + call createHsOfficeRelationTestData('First GmbH', 'PARTNER', 'Hostsharing eG', 'first contact'); call createHsOfficeRelationTestData('Firby', 'REPRESENTATIVE', 'First GmbH', 'first contact'); call createHsOfficeRelationTestData('First GmbH', 'DEBITOR', 'First GmbH', 'first contact'); diff --git a/src/main/resources/db/changelog/5-hs-office/504-partner/5048-hs-office-partner-test-data.sql b/src/main/resources/db/changelog/5-hs-office/504-partner/5048-hs-office-partner-test-data.sql index 4b63b8c2..4ac1dff9 100644 --- a/src/main/resources/db/changelog/5-hs-office/504-partner/5048-hs-office-partner-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/504-partner/5048-hs-office-partner-test-data.sql @@ -15,7 +15,6 @@ create or replace procedure createHsOfficePartnerTestData( contactCaption varchar ) language plpgsql as $$ declare - currentTask varchar; idName varchar; mandantPerson hs_office_person; partnerRel hs_office_relation; @@ -23,9 +22,6 @@ declare relatedDetailsUuid uuid; begin idName := cleanIdentifier( partnerPersonName|| '-' || contactCaption); - currentTask := 'creating partner test-data ' || idName; - call defineContext(currentTask, null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); - execute format('set local hsadminng.currentTask to %L', currentTask); select p.* from hs_office_person p where p.tradeName = mandantTradeName @@ -69,13 +65,14 @@ end; $$; --// - -- ============================================================================ --changeset hs-office-partner-TEST-DATA-GENERATION:1 –context=dev,tc endDelimiter:--// -- ---------------------------------------------------------------------------- do language plpgsql $$ begin + call defineContext('creating partner test-data ', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); + call createHsOfficePartnerTestData('Hostsharing eG', 10001, 'First GmbH', 'first contact'); call createHsOfficePartnerTestData('Hostsharing eG', 10002, 'Second e.K.', 'second contact'); call createHsOfficePartnerTestData('Hostsharing eG', 10003, 'Third OHG', 'third contact'); diff --git a/src/main/resources/db/changelog/5-hs-office/505-bankaccount/5058-hs-office-bankaccount-test-data.sql b/src/main/resources/db/changelog/5-hs-office/505-bankaccount/5058-hs-office-bankaccount-test-data.sql index 1fe73c71..338ab61c 100644 --- a/src/main/resources/db/changelog/5-hs-office/505-bankaccount/5058-hs-office-bankaccount-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/505-bankaccount/5058-hs-office-bankaccount-test-data.sql @@ -11,16 +11,11 @@ create or replace procedure createHsOfficeBankAccountTestData(givenHolder varchar, givenIBAN varchar, givenBIC varchar) language plpgsql as $$ declare - currentTask varchar; emailAddr varchar; begin - currentTask = 'creating bankaccount test-data ' || givenHolder; - execute format('set local hsadminng.currentTask to %L', currentTask); - emailAddr = 'bankaccount-admin@' || cleanIdentifier(givenHolder) || '.example.com'; - call defineContext(currentTask); perform createRbacUser(emailAddr); - call defineContext(currentTask, null, emailAddr); + call defineContext('creating bankaccount test-data', null, emailAddr); raise notice 'creating test bankaccount: %', givenHolder; insert @@ -36,6 +31,8 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating bankaccount test-data'); + -- IBANs+BICs taken from https://ibanvalidieren.de/beispiele.html call createHsOfficeBankAccountTestData('First GmbH', 'DE02120300000000202051', 'BYLADEM1001'); call createHsOfficeBankAccountTestData('Peter Smith', 'DE02500105170137075030', 'INGDDEFF'); diff --git a/src/main/resources/db/changelog/5-hs-office/506-debitor/5068-hs-office-debitor-test-data.sql b/src/main/resources/db/changelog/5-hs-office/506-debitor/5068-hs-office-debitor-test-data.sql index 2e888e29..da9a5f2e 100644 --- a/src/main/resources/db/changelog/5-hs-office/506-debitor/5068-hs-office-debitor-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/506-debitor/5068-hs-office-debitor-test-data.sql @@ -16,15 +16,11 @@ create or replace procedure createHsOfficeDebitorTestData( ) language plpgsql as $$ declare - currentTask varchar; idName varchar; relatedDebitorRelUuid uuid; relatedBankAccountUuid uuid; begin idName := cleanIdentifier( forPartnerPersonName|| '-' || forBillingContactCaption); - currentTask := 'creating debitor test-data ' || idName; - call defineContext(currentTask, null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); - execute format('set local hsadminng.currentTask to %L', currentTask); select debitorRel.uuid into relatedDebitorRelUuid @@ -54,6 +50,8 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating debitor test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); + call createHsOfficeDebitorTestData(11, 'First GmbH', 'first contact', 'fir'); call createHsOfficeDebitorTestData(12, 'Second e.K.', 'second contact', 'sec'); call createHsOfficeDebitorTestData(13, 'Third OHG', 'third contact', 'thi'); diff --git a/src/main/resources/db/changelog/5-hs-office/507-sepamandate/5078-hs-office-sepamandate-test-data.sql b/src/main/resources/db/changelog/5-hs-office/507-sepamandate/5078-hs-office-sepamandate-test-data.sql index e664d8c5..6c8aa15e 100644 --- a/src/main/resources/db/changelog/5-hs-office/507-sepamandate/5078-hs-office-sepamandate-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/507-sepamandate/5078-hs-office-sepamandate-test-data.sql @@ -15,14 +15,9 @@ create or replace procedure createHsOfficeSepaMandateTestData( withReference varchar) language plpgsql as $$ declare - currentTask varchar; relatedDebitor hs_office_debitor; relatedBankAccount hs_office_bankAccount; begin - currentTask := 'creating SEPA-mandate test-data ' || forPartnerNumber::text || forDebitorSuffix::text; - call defineContext(currentTask, null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); - execute format('set local hsadminng.currentTask to %L', currentTask); - select debitor.* into relatedDebitor from hs_office_debitor debitor join hs_office_relation debitorRel on debitorRel.uuid = debitor.debitorRelUuid @@ -48,6 +43,8 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating SEPA-mandate test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); + call createHsOfficeSepaMandateTestData(10001, '11', 'DE02120300000000202051', 'ref-10001-11'); call createHsOfficeSepaMandateTestData(10002, '12', 'DE02100500000054540402', 'ref-10002-12'); call createHsOfficeSepaMandateTestData(10003, '13', 'DE02300209000106531065', 'ref-10003-13'); diff --git a/src/main/resources/db/changelog/5-hs-office/510-membership/5108-hs-office-membership-test-data.sql b/src/main/resources/db/changelog/5-hs-office/510-membership/5108-hs-office-membership-test-data.sql index b8cbb45b..205efcc9 100644 --- a/src/main/resources/db/changelog/5-hs-office/510-membership/5108-hs-office-membership-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/510-membership/5108-hs-office-membership-test-data.sql @@ -13,15 +13,8 @@ create or replace procedure createHsOfficeMembershipTestData( newMemberNumberSuffix char(2) ) language plpgsql as $$ declare - currentTask varchar; relatedPartner hs_office_partner; begin - currentTask := 'creating Membership test-data ' || - 'P-' || forPartnerNumber::text || - 'M-...' || newMemberNumberSuffix; - call defineContext(currentTask, null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); - execute format('set local hsadminng.currentTask to %L', currentTask); - select partner.* from hs_office_partner partner where partner.partnerNumber = forPartnerNumber into relatedPartner; @@ -40,6 +33,8 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating Membership test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); + call createHsOfficeMembershipTestData(10001, '01'); call createHsOfficeMembershipTestData(10002, '02'); call createHsOfficeMembershipTestData(10003, '03'); 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 21d266ac..4efb55db 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 @@ -14,15 +14,9 @@ create or replace procedure createHsOfficeCoopSharesTransactionTestData( ) language plpgsql as $$ declare - currentTask varchar; membership hs_office_membership; subscriptionEntryUuid uuid; begin - currentTask = 'creating coopSharesTransaction test-data ' || givenPartnerNumber::text || givenMemberNumberSuffix; - execute format('set local hsadminng.currentTask to %L', currentTask); - SET CONSTRAINTS ALL DEFERRED; - - call defineContext(currentTask); select m.uuid from hs_office_membership m join hs_office_partner p on p.uuid = m.partneruuid @@ -49,6 +43,9 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating coopSharesTransaction test-data'); + SET CONSTRAINTS ALL DEFERRED; + call createHsOfficeCoopSharesTransactionTestData(10001, '01'); call createHsOfficeCoopSharesTransactionTestData(10002, '02'); call createHsOfficeCoopSharesTransactionTestData(10003, '03'); diff --git a/src/main/resources/db/changelog/5-hs-office/512-coopassets/5128-hs-office-coopassets-test-data.sql b/src/main/resources/db/changelog/5-hs-office/512-coopassets/5128-hs-office-coopassets-test-data.sql index 1eda1de6..b3cdab98 100644 --- a/src/main/resources/db/changelog/5-hs-office/512-coopassets/5128-hs-office-coopassets-test-data.sql +++ b/src/main/resources/db/changelog/5-hs-office/512-coopassets/5128-hs-office-coopassets-test-data.sql @@ -14,15 +14,9 @@ create or replace procedure createHsOfficeCoopAssetsTransactionTestData( ) language plpgsql as $$ declare - currentTask varchar; membership hs_office_membership; lossEntryUuid uuid; begin - currentTask = 'creating coopAssetsTransaction test-data ' || givenPartnerNumber || givenMemberNumberSuffix; - execute format('set local hsadminng.currentTask to %L', currentTask); - SET CONSTRAINTS ALL DEFERRED; - - call defineContext(currentTask); select m.uuid from hs_office_membership m join hs_office_partner p on p.uuid = m.partneruuid @@ -49,6 +43,9 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating coopAssetsTransaction test-data'); + SET CONSTRAINTS ALL DEFERRED; + call createHsOfficeCoopAssetsTransactionTestData(10001, '01'); call createHsOfficeCoopAssetsTransactionTestData(10002, '02'); call createHsOfficeCoopAssetsTransactionTestData(10003, '03'); diff --git a/src/main/resources/db/changelog/6-hs-booking/620-booking-project/6208-hs-booking-project-test-data.sql b/src/main/resources/db/changelog/6-hs-booking/620-booking-project/6208-hs-booking-project-test-data.sql index 5ebae299..2113ae5e 100644 --- a/src/main/resources/db/changelog/6-hs-booking/620-booking-project/6208-hs-booking-project-test-data.sql +++ b/src/main/resources/db/changelog/6-hs-booking/620-booking-project/6208-hs-booking-project-test-data.sql @@ -14,12 +14,8 @@ create or replace procedure createHsBookingProjectTransactionTestData( ) language plpgsql as $$ declare - currentTask varchar; relatedDebitor hs_office_debitor; begin - currentTask := 'creating booking-project test-data ' || givenPartnerNumber::text || givenDebitorSuffix; - call defineContext(currentTask, null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); - execute format('set local hsadminng.currentTask to %L', currentTask); select debitor.* into relatedDebitor from hs_office_debitor debitor @@ -43,6 +39,8 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating booking-project test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); + call createHsBookingProjectTransactionTestData(10001, '11'); call createHsBookingProjectTransactionTestData(10002, '12'); call createHsBookingProjectTransactionTestData(10003, '13'); diff --git a/src/main/resources/db/changelog/6-hs-booking/630-booking-item/6208-hs-booking-item-test-data.sql b/src/main/resources/db/changelog/6-hs-booking/630-booking-item/6208-hs-booking-item-test-data.sql index 94c2e665..4052b5c3 100644 --- a/src/main/resources/db/changelog/6-hs-booking/630-booking-item/6208-hs-booking-item-test-data.sql +++ b/src/main/resources/db/changelog/6-hs-booking/630-booking-item/6208-hs-booking-item-test-data.sql @@ -14,15 +14,10 @@ create or replace procedure createHsBookingItemTransactionTestData( ) language plpgsql as $$ declare - currentTask varchar; relatedProject hs_booking_project; privateCloudUuid uuid; managedServerUuid uuid; begin - currentTask := 'creating booking-item test-data ' || givenPartnerNumber::text || givenDebitorSuffix; - call defineContext(currentTask, null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); - execute format('set local hsadminng.currentTask to %L', currentTask); - select project.* into relatedProject from hs_booking_project project where project.caption = 'D-' || givenPartnerNumber || givenDebitorSuffix || ' default project'; @@ -49,7 +44,11 @@ end; $$; -- ---------------------------------------------------------------------------- do language plpgsql $$ + declare + currentTask text; begin + call defineContext('creating booking-item test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); + call createHsBookingItemTransactionTestData(10001, '11'); call createHsBookingItemTransactionTestData(10002, '12'); call createHsBookingItemTransactionTestData(10003, '13'); diff --git a/src/main/resources/db/changelog/7-hs-hosting/701-hosting-asset/7018-hs-hosting-asset-test-data.sql b/src/main/resources/db/changelog/7-hs-hosting/701-hosting-asset/7018-hs-hosting-asset-test-data.sql index a74b6126..0af7e38e 100644 --- a/src/main/resources/db/changelog/7-hs-hosting/701-hosting-asset/7018-hs-hosting-asset-test-data.sql +++ b/src/main/resources/db/changelog/7-hs-hosting/701-hosting-asset/7018-hs-hosting-asset-test-data.sql @@ -11,7 +11,6 @@ create or replace procedure createHsHostingAssetTestData(givenProjectCaption varchar) language plpgsql as $$ declare - currentTask varchar; relatedProject hs_booking_project; relatedDebitor hs_office_debitor; privateCloudBI hs_booking_item; @@ -31,9 +30,7 @@ declare pgSqlInstanceUuid uuid; PgSqlUserUuid uuid; begin - currentTask := 'creating hosting-asset test-data ' || givenProjectCaption; - call defineContext(currentTask, null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); - execute format('set local hsadminng.currentTask to %L', currentTask); + call defineContext('creating hosting-asset test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); select project.* into relatedProject from hs_booking_project project @@ -113,6 +110,8 @@ end; $$; do language plpgsql $$ begin + call defineContext('creating hosting-asset test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN'); + call createHsHostingAssetTestData('D-1000111 default project'); call createHsHostingAssetTestData('D-1000212 default project'); call createHsHostingAssetTestData('D-1000313 default project'); diff --git a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemRepositoryIntegrationTest.java index cef07860..ca931e44 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemRepositoryIntegrationTest.java @@ -68,7 +68,7 @@ class HsBookingItemRepositoryIntegrationTest extends ContextBasedTestWithCleanup public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'caption' from tx_journal_v where targettable = 'hs_booking_item'; """); @@ -78,9 +78,13 @@ class HsBookingItemRepositoryIntegrationTest extends ContextBasedTestWithCleanup // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating booking-item test-data 1000111, hs_booking_item, INSERT]", - "[creating booking-item test-data 1000212, hs_booking_item, INSERT]", - "[creating booking-item test-data 1000313, hs_booking_item, INSERT]"); + "[creating booking-item test-data, hs_booking_item, INSERT, prod CloudServer]", + "[creating booking-item test-data, hs_booking_item, INSERT, separate ManagedServer]", + "[creating booking-item test-data, hs_booking_item, INSERT, separate ManagedWebspace]", + "[creating booking-item test-data, hs_booking_item, INSERT, some ManagedServer]", + "[creating booking-item test-data, hs_booking_item, INSERT, some ManagedWebspace]", + "[creating booking-item test-data, hs_booking_item, INSERT, some PrivateCloud]", + "[creating booking-item test-data, hs_booking_item, INSERT, test CloudServer]"); } @Test diff --git a/src/test/java/net/hostsharing/hsadminng/hs/booking/project/HsBookingProjectRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/booking/project/HsBookingProjectRepositoryIntegrationTest.java index e7b58acc..b3a05ffa 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/booking/project/HsBookingProjectRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/booking/project/HsBookingProjectRepositoryIntegrationTest.java @@ -63,7 +63,7 @@ class HsBookingProjectRepositoryIntegrationTest extends ContextBasedTestWithClea public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'caption' from tx_journal_v where targettable = 'hs_booking_project'; """); @@ -73,9 +73,9 @@ class HsBookingProjectRepositoryIntegrationTest extends ContextBasedTestWithClea // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating booking-project test-data 1000111, hs_booking_project, INSERT]", - "[creating booking-project test-data 1000212, hs_booking_project, INSERT]", - "[creating booking-project test-data 1000313, hs_booking_project, INSERT]"); + "[creating booking-project test-data, hs_booking_project, INSERT, D-1000111 default project]", + "[creating booking-project test-data, hs_booking_project, INSERT, D-1000212 default project]", + "[creating booking-project test-data, hs_booking_project, INSERT, D-1000313 default project]"); } @Test diff --git a/src/test/java/net/hostsharing/hsadminng/hs/hosting/asset/HsHostingAssetRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/hosting/asset/HsHostingAssetRepositoryIntegrationTest.java index aea6917b..26861624 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/hosting/asset/HsHostingAssetRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/hosting/asset/HsHostingAssetRepositoryIntegrationTest.java @@ -76,7 +76,7 @@ class HsHostingAssetRepositoryIntegrationTest extends ContextBasedTestWithCleanu public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'caption' from tx_journal_v where targettable = 'hs_hosting_asset'; """); @@ -86,9 +86,25 @@ class HsHostingAssetRepositoryIntegrationTest extends ContextBasedTestWithCleanu // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating hosting-asset test-data D-1000111 default project, hs_hosting_asset, INSERT]", - "[creating hosting-asset test-data D-1000212 default project, hs_hosting_asset, INSERT]", - "[creating hosting-asset test-data D-1000313 default project, hs_hosting_asset, INSERT]"); + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, another CloudServer]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some Domain-DNS-Setup]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some Domain-HTTP-Setup]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some Domain-MBOX-Setup]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some Domain-SMTP-Setup]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some Domain-Setup]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some E-Mail-Address]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some E-Mail-Alias]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some ManagedServer]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some UnixUser for E-Mail]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some UnixUser for Website]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some Webspace]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some default MariaDB instance]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some default MariaDB user]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some default MariaDB database]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some default Postgresql instance]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some default Postgresql user]", + "[creating hosting-asset test-data, hs_hosting_asset, INSERT, some default Postgresql database]" + ); } @Test diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/bankaccount/HsOfficeBankAccountRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/bankaccount/HsOfficeBankAccountRepositoryIntegrationTest.java index 291b8863..5fbd89a3 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/bankaccount/HsOfficeBankAccountRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/bankaccount/HsOfficeBankAccountRepositoryIntegrationTest.java @@ -271,7 +271,7 @@ class HsOfficeBankAccountRepositoryIntegrationTest extends ContextBasedTestWithC public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'iban' from tx_journal_v where targettable = 'hs_office_bankaccount'; """); @@ -281,8 +281,9 @@ class HsOfficeBankAccountRepositoryIntegrationTest extends ContextBasedTestWithC // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating bankaccount test-data First GmbH, hs_office_bankaccount, INSERT]", - "[creating bankaccount test-data Second e.K., hs_office_bankaccount, INSERT]"); + "[creating bankaccount test-data, hs_office_bankaccount, INSERT, DE02120300000000202051]", + "[creating bankaccount test-data, hs_office_bankaccount, INSERT, DE02500105170137075030]", + "[creating bankaccount test-data, hs_office_bankaccount, INSERT, DE02100500000054540402]"); } private HsOfficeBankAccountEntity givenSomeTemporaryBankAccount(final String createdByUser) { diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/contact/HsOfficeContactRbacRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/contact/HsOfficeContactRbacRepositoryIntegrationTest.java index 5f5e6190..5eea0091 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/contact/HsOfficeContactRbacRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/contact/HsOfficeContactRbacRepositoryIntegrationTest.java @@ -256,7 +256,7 @@ class HsOfficeContactRbacRepositoryIntegrationTest extends ContextBasedTestWithC public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'caption' from tx_journal_v where targettable = 'hs_office_contact'; """); @@ -266,8 +266,9 @@ class HsOfficeContactRbacRepositoryIntegrationTest extends ContextBasedTestWithC // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating contact test-data first contact, hs_office_contact, INSERT]", - "[creating contact test-data second contact, hs_office_contact, INSERT]"); + "[creating contact test-data, hs_office_contact, INSERT, first contact]", + "[creating contact test-data, hs_office_contact, INSERT, second contact]", + "[creating contact test-data, hs_office_contact, INSERT, third contact]"); } private HsOfficeContactRbacEntity givenSomeTemporaryContact( diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionRepositoryIntegrationTest.java index 376da64d..ad059e16 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionRepositoryIntegrationTest.java @@ -220,7 +220,7 @@ class HsOfficeCoopAssetsTransactionRepositoryIntegrationTest extends ContextBase public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'reference' from tx_journal_v where targettable = 'hs_office_coopassetstransaction'; """); @@ -230,8 +230,18 @@ class HsOfficeCoopAssetsTransactionRepositoryIntegrationTest extends ContextBase // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating coopAssetsTransaction test-data 1000101, hs_office_coopassetstransaction, INSERT]", - "[creating coopAssetsTransaction test-data 1000202, hs_office_coopassetstransaction, INSERT]"); + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000101-1]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000101-2]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000101-3]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000101-3]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000202-1]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000202-2]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000202-3]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000202-3]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000303-1]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000303-2]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000303-3]", + "[creating coopAssetsTransaction test-data, hs_office_coopassetstransaction, INSERT, ref 1000303-3]"); } @BeforeEach 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 cc81f352..db1b0f39 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 @@ -219,7 +219,7 @@ class HsOfficeCoopSharesTransactionRepositoryIntegrationTest extends ContextBase public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'reference' from tx_journal_v where targettable = 'hs_office_coopsharestransaction'; """); @@ -229,8 +229,18 @@ class HsOfficeCoopSharesTransactionRepositoryIntegrationTest extends ContextBase // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating coopSharesTransaction test-data 1000101, hs_office_coopsharestransaction, INSERT]", - "[creating coopSharesTransaction test-data 1000202, hs_office_coopsharestransaction, INSERT]"); + "[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]"); } @BeforeEach diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorRepositoryIntegrationTest.java index a1fccbb9..1d16254d 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorRepositoryIntegrationTest.java @@ -589,7 +589,7 @@ class HsOfficeDebitorRepositoryIntegrationTest extends ContextBasedTestWithClean public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'defaultprefix' from tx_journal_v where targettable = 'hs_office_debitor'; """); @@ -599,8 +599,9 @@ class HsOfficeDebitorRepositoryIntegrationTest extends ContextBasedTestWithClean // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating debitor test-data FirstGmbH-firstcontact, hs_office_debitor, INSERT]", - "[creating debitor test-data Seconde.K.-secondcontact, hs_office_debitor, INSERT]"); + "[creating debitor test-data, hs_office_debitor, INSERT, fir]", + "[creating debitor test-data, hs_office_debitor, INSERT, sec]", + "[creating debitor test-data, hs_office_debitor, INSERT, thi]"); } private HsOfficeDebitorEntity givenSomeTemporaryDebitor( 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 581febd8..6e013be2 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 @@ -336,7 +336,7 @@ class HsOfficeMembershipRepositoryIntegrationTest extends ContextBasedTestWithCl public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'membernumbersuffix' from tx_journal_v where targettable = 'hs_office_membership'; """); @@ -346,9 +346,9 @@ class HsOfficeMembershipRepositoryIntegrationTest extends ContextBasedTestWithCl // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating Membership test-data P-10001M-...01, hs_office_membership, INSERT]", - "[creating Membership test-data P-10002M-...02, hs_office_membership, INSERT]", - "[creating Membership test-data P-10003M-...03, hs_office_membership, INSERT]"); + "[creating Membership test-data, hs_office_membership, INSERT, 01]", + "[creating Membership test-data, hs_office_membership, INSERT, 02]", + "[creating Membership test-data, hs_office_membership, INSERT, 03]"); } private HsOfficeMembershipEntity givenSomeTemporaryMembership(final String partnerTradeName, final String memberNumberSuffix) { diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/partner/HsOfficePartnerRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/partner/HsOfficePartnerRepositoryIntegrationTest.java index e365d183..2d871048 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/partner/HsOfficePartnerRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/partner/HsOfficePartnerRepositoryIntegrationTest.java @@ -433,7 +433,7 @@ class HsOfficePartnerRepositoryIntegrationTest extends ContextBasedTestWithClean public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'partnernumber' from tx_journal_v where targettable = 'hs_office_partner'; """); @@ -443,8 +443,11 @@ class HsOfficePartnerRepositoryIntegrationTest extends ContextBasedTestWithClean // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating partner test-data FirstGmbH-firstcontact, hs_office_partner, INSERT]", - "[creating partner test-data Seconde.K.-secondcontact, hs_office_partner, INSERT]"); + "[creating partner test-data , hs_office_partner, INSERT, 10001]", + "[creating partner test-data , hs_office_partner, INSERT, 10002]", + "[creating partner test-data , hs_office_partner, INSERT, 10003]", + "[creating partner test-data , hs_office_partner, INSERT, 10004]", + "[creating partner test-data , hs_office_partner, INSERT, 10010]"); } private HsOfficePartnerEntity givenSomeTemporaryHostsharingPartner( diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonRepositoryIntegrationTest.java index b0e1c893..6ee4f486 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonRepositoryIntegrationTest.java @@ -260,7 +260,7 @@ class HsOfficePersonRepositoryIntegrationTest extends ContextBasedTestWithCleanu public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'tradename', targetdelta->>'lastname' from tx_journal_v where targettable = 'hs_office_person'; """); @@ -270,8 +270,10 @@ class HsOfficePersonRepositoryIntegrationTest extends ContextBasedTestWithCleanu // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating person test-data First GmbH, hs_office_person, INSERT]", - "[creating person test-data Second e.K., Smith, Peter, hs_office_person, INSERT]"); + "[creating person test-data, hs_office_person, INSERT, Hostsharing eG, null]", + "[creating person test-data, hs_office_person, INSERT, First GmbH, null]", + "[creating person test-data, hs_office_person, INSERT, Second e.K., null]", + "[creating person test-data, hs_office_person, INSERT, Third OHG, null]"); } private HsOfficePersonEntity givenSomeTemporaryPerson( diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/relation/HsOfficeRelationRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/relation/HsOfficeRelationRepositoryIntegrationTest.java index 151d9967..b9ccb589 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/relation/HsOfficeRelationRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/relation/HsOfficeRelationRepositoryIntegrationTest.java @@ -394,7 +394,7 @@ class HsOfficeRelationRepositoryIntegrationTest extends ContextBasedTestWithClea public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'mark' from tx_journal_v where targettable = 'hs_office_relation'; """); @@ -404,8 +404,7 @@ class HsOfficeRelationRepositoryIntegrationTest extends ContextBasedTestWithClea // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating relation test-data HostsharingeG-FirstGmbH, hs_office_relation, INSERT]", - "[creating relation test-data FirstGmbH-Firby, hs_office_relation, INSERT]"); + "[creating relation test-data, hs_office_relation, INSERT, members-announce]"); } private HsOfficeRelationRbacEntity givenSomeTemporaryRelationBessler(final String holderPerson, final String contact) { diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/sepamandate/HsOfficeSepaMandateRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/sepamandate/HsOfficeSepaMandateRepositoryIntegrationTest.java index d5fdb87d..3fb90976 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/sepamandate/HsOfficeSepaMandateRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/sepamandate/HsOfficeSepaMandateRepositoryIntegrationTest.java @@ -379,7 +379,7 @@ class HsOfficeSepaMandateRepositoryIntegrationTest extends ContextBasedTestWithC public void auditJournalLogIsAvailable() { // given final var query = em.createNativeQuery(""" - select currentTask, targetTable, targetOp + select currentTask, targetTable, targetOp, targetdelta->>'reference' from tx_journal_v where targettable = 'hs_office_sepamandate'; """); @@ -389,9 +389,9 @@ class HsOfficeSepaMandateRepositoryIntegrationTest extends ContextBasedTestWithC // then assertThat(customerLogEntries).map(Arrays::toString).contains( - "[creating SEPA-mandate test-data 1000111, hs_office_sepamandate, INSERT]", - "[creating SEPA-mandate test-data 1000212, hs_office_sepamandate, INSERT]", - "[creating SEPA-mandate test-data 1000313, hs_office_sepamandate, INSERT]"); + "[creating SEPA-mandate test-data, hs_office_sepamandate, INSERT, ref-10001-11]", + "[creating SEPA-mandate test-data, hs_office_sepamandate, INSERT, ref-10002-12]", + "[creating SEPA-mandate test-data, hs_office_sepamandate, INSERT, ref-10003-13]"); } private HsOfficeSepaMandateEntity givenSomeTemporarySepaMandate(final String iban) {