add DomainSetup-HostingAssets for new BookingItem via created-event #111

Merged
hsh-michaelhoennig merged 31 commits from add-hsoting-asset-to-booking-item-resource-and-created-event into master 2024-10-08 11:48:35 +02:00
Showing only changes of commit 81bfa4288f - Show all commits

View File

@ -184,10 +184,12 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
"identifier": "fir10", "identifier": "fir10",
"caption": "some separate ManagedWebspace HA", "caption": "some separate ManagedWebspace HA",
"config": { "config": {
"groupid": 1000000 "groupid": {lastUnixUserId}
} }
} }
""")) """
.replace("{lastUnixUserId}", lastUnixUserId().toString())
))
.header("Location", matchesRegex("http://localhost:[1-9][0-9]*/api/hs/hosting/assets/[^/]*")) .header("Location", matchesRegex("http://localhost:[1-9][0-9]*/api/hs/hosting/assets/[^/]*"))
.extract().header("Location"); // @formatter:on .extract().header("Location"); // @formatter:on
@ -777,4 +779,11 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
}).returnedValue(); }).returnedValue();
} }
private Integer lastUnixUserId() {
final Object result = em.createNativeQuery("SELECT last_value from hs_hosting.asset_unixuser_system_id_seq", Integer.class)
.getSingleResult();
return (Integer) result;
}
} }