From 8ea2bbf6c06ce7a7bddb28ae203b5c4e2e7d40cb Mon Sep 17 00:00:00 2001 From: "tobias.pobocik" Date: Wed, 10 Apr 2024 14:18:43 +0200 Subject: [PATCH] Adjust expected message response https://github.com/opendaylight/netconf/commit/32fad0d2b1161304ff9a9d18ea2f4e72dff591d5#diff-a1e7e241d013f73929272ede23e40fe332e4f161302f829b3c9f19900d0e2afdR222 Signed-off-by: tobias.pobocik --- .../modules/gnmi/test/gnmi/rcgnmi/GnmiCertificatesTest.java | 6 ++++-- .../lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiSetITTest.java | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiCertificatesTest.java b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiCertificatesTest.java index 293fa54bb3..2bad455e54 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiCertificatesTest.java +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiCertificatesTest.java @@ -226,7 +226,8 @@ public void connectDeviceWithWrongCaCertificatesAndReconnect() throws IOExceptio HttpResponse tdGetResponse = sendGetRequestJSON(String.format(TEST_DATA_PATH, GNMI_NODE_ID)); Assertions.assertEquals(HttpURLConnection.HTTP_UNAVAILABLE, tdGetResponse.statusCode()); - assertTrue(tdGetResponse.body().contains("Mount point does not exist")); + assertTrue(tdGetResponse.body().contains("Mount point") && tdGetResponse.body() + .contains("does not exist")); }); // Register correct keystore @@ -296,7 +297,8 @@ public void connectDeviceWithoutPassphrase() throws IOException, InterruptedExce HttpResponse tdGetResponse = sendGetRequestJSON(String.format(TEST_DATA_PATH, GNMI_NODE_ID)); assertEquals(HttpURLConnection.HTTP_UNAVAILABLE, tdGetResponse.statusCode()); - assertTrue(tdGetResponse.body().contains("Mount point does not exist")); + assertTrue(tdGetResponse.body().contains("Mount point") && tdGetResponse.body() + .contains("does not exist")); }); } diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiSetITTest.java b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiSetITTest.java index 967068639c..b41b2a3efd 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiSetITTest.java +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiSetITTest.java @@ -88,11 +88,11 @@ public class GnmiSetITTest extends GnmiITBase { + " \"errors\": {\n" + " \"error\": [\n" + " {\n" - + " \"error-type\": \"application\",\n" + " \"error-tag\": \"operation-failed\",\n" - + " \"error-info\": \"io.grpc.StatusRuntimeException: NOT_FOUND: " + + " \"error-info\": \"NOT_FOUND: " + "Update for non existing simple value is not permitted\",\n" - + " \"error-message\": \"Transaction failed\"\n" + + " \"error-message\": \"Transaction(PUT) failed\",\n" + + " \"error-type\": \"application\"\n" + " }\n" + " ]\n" + " }\n"