From 09405eb5496996a0c24f514b0a9c29b34f58b89c Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Mon, 15 Apr 2024 07:36:54 +0200 Subject: [PATCH] fix expected resources in acceptance test --- .../HsBookingItemControllerAcceptanceTest.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java index f5dafb11..7579e23c 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java @@ -66,26 +66,25 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup .then().log().all().assertThat() .statusCode(200) .contentType("application/json") - .log().all() .body("", lenientlyEquals(""" [ { "caption": "some ManagedServer", "validFrom": "2022-10-01", "validTo": null, - "resources": null + "resources": { CPUs: 2, SDD-storage: 512 } }, { "caption": "some CloudServer", "validFrom": "2023-01-15", "validTo": "2024-04-14", - "resources": null + "resources": { CPUs: 2, HDD-storage: 1024 } }, { "caption": "some Whatever", "validFrom": "2024-04-01", "validTo": null, - "resources": null + "resources": { CPUs: 1, HDD-storage: 2048, SDD-storage: 512 } } ] """)); @@ -110,9 +109,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup { "debitorUuid": "%s", "caption": "some new booking", - "resources": { - "something": 12 - }, + "resources": { "something": 12 }, "validFrom": "2022-10-13" } """.formatted(givenDebitor.getUuid())) @@ -127,7 +124,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup "caption": "some new booking", "validFrom": "2022-10-13", "validTo": null, - "resources": null + "resources": { "something": 12 } } """)) .header("Location", startsWith("http://localhost")) @@ -165,7 +162,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup "caption": "some CloudServer", "validFrom": "2023-01-15", "validTo": "2024-04-14", - "resources": null + "resources": { CPUs: 2, HDD-storage: 1024 } } """)); // @formatter:on } @@ -210,7 +207,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup "caption": "some CloudServer", "validFrom": "2023-01-15", "validTo": "2024-04-14", - "resources": null + "resources": { CPUs: 2, HDD-storage: 1024 } } """)); // @formatter:on }