cleanup
This commit is contained in:
parent
875ff5c046
commit
75611d7092
@ -116,8 +116,7 @@ public class HsBookingItemEntity implements Stringifyable, RbacObject {
|
|||||||
@JoinColumn(name="parentitemuuid", referencedColumnName="uuid")
|
@JoinColumn(name="parentitemuuid", referencedColumnName="uuid")
|
||||||
private List<HsBookingItemEntity> subBookingItems;
|
private List<HsBookingItemEntity> subBookingItems;
|
||||||
|
|
||||||
@OneToOne(mappedBy="bookingItem", optional = true)
|
@OneToOne(mappedBy="bookingItem")
|
||||||
@NotFound(action = NotFoundAction.IGNORE)
|
|
||||||
private HsHostingAssetEntity relatedHostingAsset;
|
private HsHostingAssetEntity relatedHostingAsset;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -177,15 +177,11 @@ class HsBookingItemRepositoryIntegrationTest extends ContextBasedTestWithCleanup
|
|||||||
"HsBookingItemEntity(D-1000212:D-1000212 default project, MANAGED_WEBSPACE, [2022-10-01,), separate ManagedWebspace, { Daemons: 0, Multi: 1, SSD: 100, Traffic: 50 })",
|
"HsBookingItemEntity(D-1000212:D-1000212 default project, MANAGED_WEBSPACE, [2022-10-01,), separate ManagedWebspace, { Daemons: 0, Multi: 1, SSD: 100, Traffic: 50 })",
|
||||||
"HsBookingItemEntity(D-1000212:D-1000212 default project, MANAGED_SERVER, [2022-10-01,), separate ManagedServer, { CPUs: 2, RAM: 8, SSD: 500, Traffic: 500 })",
|
"HsBookingItemEntity(D-1000212:D-1000212 default project, MANAGED_SERVER, [2022-10-01,), separate ManagedServer, { CPUs: 2, RAM: 8, SSD: 500, Traffic: 500 })",
|
||||||
"HsBookingItemEntity(D-1000212:D-1000212 default project, PRIVATE_CLOUD, [2024-04-01,), some PrivateCloud, { CPUs: 10, HDD: 10000, RAM: 32, SSD: 4000, Traffic: 2000 })");
|
"HsBookingItemEntity(D-1000212:D-1000212 default project, PRIVATE_CLOUD, [2024-04-01,), some PrivateCloud, { CPUs: 10, HDD: 10000, RAM: 32, SSD: 4000, Traffic: 2000 })");
|
||||||
assertThat(result.stream().filter(bi -> bi.getRelatedHostingAsset()!=null).map(bi -> x(bi)).findAny())
|
assertThat(result.stream().filter(bi -> bi.getRelatedHostingAsset()!=null).findAny())
|
||||||
.as("at least one relatedProject expected, but none found => fetcing relatedProject does not work")
|
.as("at least one relatedProject expected, but none found => fetching relatedProject does not work")
|
||||||
.isNotEmpty();
|
.isNotEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
HsBookingItemEntity x(HsBookingItemEntity x) {
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void normalUser_canViewOnlyRelatedBookingItems() {
|
public void normalUser_canViewOnlyRelatedBookingItems() {
|
||||||
// given:
|
// given:
|
||||||
|
Loading…
Reference in New Issue
Block a user