1
0

booking-item-to-related-hosting-asset-just-1-to-1 (#61)

Co-authored-by: Michael Hoennig <michael@hoennig.de>
Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/61
Reviewed-by: Marc Sandlus <marc.sandlus@hostsharing.net>
This commit is contained in:
Michael Hoennig
2024-06-18 13:53:11 +02:00
parent cbadc6e2c7
commit 62867a4cac
4 changed files with 55 additions and 46 deletions

View File

@ -139,27 +139,26 @@ class HsManagedServerBookingItemValidatorUnitTest {
entry("Traffic", 1000),
entry("Multi", 1)
))
.subHostingAssets(of(
HsHostingAssetEntity.builder()
.type(HsHostingAssetType.MANAGED_WEBSPACE)
.identifier("abc00")
.subHostingAssets(concat(
generate(26, HsHostingAssetType.UNIX_USER, "xyz00-%c%c"),
generateDbUsersWithDatabases(3, HsHostingAssetType.PGSQL_USER,
"xyz00_%c%c",
1, HsHostingAssetType.PGSQL_DATABASE
),
generateDbUsersWithDatabases(3, HsHostingAssetType.MARIADB_USER,
"xyz00_%c%c",
2, HsHostingAssetType.MARIADB_DATABASE
),
generateDomainEmailSetupsWithEMailAddresses(26, HsHostingAssetType.DOMAIN_EMAIL_SETUP,
"%c%c.example.com",
10, HsHostingAssetType.EMAIL_ADDRESS
)
))
.build()
))
.relatedHostingAsset(HsHostingAssetEntity.builder()
.type(HsHostingAssetType.MANAGED_WEBSPACE)
.identifier("abc00")
.subHostingAssets(concat(
generate(26, HsHostingAssetType.UNIX_USER, "xyz00-%c%c"),
generateDbUsersWithDatabases(3, HsHostingAssetType.PGSQL_USER,
"xyz00_%c%c",
1, HsHostingAssetType.PGSQL_DATABASE
),
generateDbUsersWithDatabases(3, HsHostingAssetType.MARIADB_USER,
"xyz00_%c%c",
2, HsHostingAssetType.MARIADB_DATABASE
),
generateDomainEmailSetupsWithEMailAddresses(26, HsHostingAssetType.DOMAIN_EMAIL_SETUP,
"%c%c.example.com",
10, HsHostingAssetType.EMAIL_ADDRESS
)
))
.build()
)
.build();
// when