fix lastUnixUserId

This commit is contained in:
Michael Hoennig 2024-10-07 16:46:57 +02:00
parent 7c598632ed
commit 81bfa4288f

View File

@ -184,10 +184,12 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
"identifier": "fir10",
"caption": "some separate ManagedWebspace HA",
"config": {
"groupid": 1000000
"groupid": {lastUnixUserId}
}
}
"""))
"""
.replace("{lastUnixUserId}", lastUnixUserId().toString())
))
.header("Location", matchesRegex("http://localhost:[1-9][0-9]*/api/hs/hosting/assets/[^/]*"))
.extract().header("Location"); // @formatter:on
@ -777,4 +779,11 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
}).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;
}
}