From 512a0f30d4a53ad233ab417c87171e643d22553d Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Thu, 29 Feb 2024 13:35:31 -0500 Subject: [PATCH] update test for labels/annotations as key-value lists --- src/test/java/itest/CustomTargetsTest.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/test/java/itest/CustomTargetsTest.java b/src/test/java/itest/CustomTargetsTest.java index ccfea9b51..f5865310d 100644 --- a/src/test/java/itest/CustomTargetsTest.java +++ b/src/test/java/itest/CustomTargetsTest.java @@ -16,6 +16,7 @@ package itest; import java.net.UnknownHostException; +import java.util.List; import java.util.Map; import java.util.UUID; import java.util.concurrent.CountDownLatch; @@ -224,16 +225,21 @@ void shouldBeAbleToDefineTarget() MatcherAssert.assertThat(item.getString("jvmId"), Matchers.equalTo(itestJvmId)); MatcherAssert.assertThat(item.getString("alias"), Matchers.equalTo(alias)); MatcherAssert.assertThat(item.getString("connectUrl"), Matchers.equalTo(SELF_JMX_URL)); - MatcherAssert.assertThat(item.getJsonObject("labels"), Matchers.equalTo(new JsonObject())); + MatcherAssert.assertThat(item.getJsonArray("labels"), Matchers.equalTo(new JsonArray())); MatcherAssert.assertThat( item.getJsonObject("annotations"), Matchers.equalTo( new JsonObject( Map.of( "platform", - Map.of(), + List.of(), "cryostat", - Map.of("REALM", "Custom Targets"))))); + List.of( + Map.of( + "key", + "REALM", + "value", + "Custom Targets")))))); } @Test