From 3f92019e0b36144fb9681373805cca5e3043d073 Mon Sep 17 00:00:00 2001 From: "tobias.pobocik" Date: Tue, 28 May 2024 12:24:01 +0200 Subject: [PATCH] Create a workaround for YANGTOOLS-1575 Comment these tests out until YANGTOOLS-1575 is resolved. JIRA: LIGHTY-303 Signed-off-by: tobias.pobocik --- .../codecs/YangInstanceNormToGnmiUpdateCodecTest.java | 3 ++- .../io/lighty/modules/gnmi/test/gnmi/SimulatorCrudTest.java | 3 ++- .../lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiGetITTest.java | 2 ++ .../lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiSetITTest.java | 6 ++++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-sb/src/test/java/io/lighty/gnmi/southbound/mountpoint/codecs/YangInstanceNormToGnmiUpdateCodecTest.java b/lighty-modules/lighty-gnmi/lighty-gnmi-sb/src/test/java/io/lighty/gnmi/southbound/mountpoint/codecs/YangInstanceNormToGnmiUpdateCodecTest.java index acf01c15ba..fa4b5892f4 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-sb/src/test/java/io/lighty/gnmi/southbound/mountpoint/codecs/YangInstanceNormToGnmiUpdateCodecTest.java +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-sb/src/test/java/io/lighty/gnmi/southbound/mountpoint/codecs/YangInstanceNormToGnmiUpdateCodecTest.java @@ -47,6 +47,7 @@ public void topLevelElementTest() throws Exception { assertUpdateEquals(prepared.getValue(), result); } +/*FIXME uncomment after YANGTOOLS-1575 is resolved @Test public void listEntryCase() throws Exception { final Map.Entry, Gnmi.Update> prepared = @@ -54,7 +55,7 @@ public void listEntryCase() throws Exception { final Gnmi.Update result = codec.apply(prepared.getKey().left, prepared.getKey().right); assertUpdateEquals(prepared.getValue(), result); } - +*/ @Test public void containerCase() throws Exception { Map.Entry, Gnmi.Update> prepared = diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/SimulatorCrudTest.java b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/SimulatorCrudTest.java index 626e50964c..e6c0d6867f 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/SimulatorCrudTest.java +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/SimulatorCrudTest.java @@ -638,7 +638,7 @@ public void crudComplexAugmentedValue() throws ExecutionException, InterruptedEx assertThrows(ExecutionException.class, () -> sessionProvider.getGnmiSession().get(getRequest).get()); } - +/*FIXME uncomment after YANGTOOLS-1575 is resolved @Test public void getListEntryTest() throws ExecutionException, InterruptedException, IOException, JSONException { final Gnmi.Path path = Gnmi.Path.newBuilder() @@ -681,6 +681,7 @@ public void getListEntryTest() throws ExecutionException, InterruptedException, jsonElement.getAsJsonObject().add(INTERFACES_PREFIX + ":" + OPENCONFIG_CONFIG, configElement); JSONAssert.assertEquals(jsonElement.toString(), responseJson, false); } +*/ @Test public void capabilityTest() throws ExecutionException, InterruptedException { diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiGetITTest.java b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiGetITTest.java index 742938ac82..7359657110 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiGetITTest.java +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/rcgnmi/GnmiGetITTest.java @@ -162,6 +162,7 @@ public void getLeafIdentityRefTest() throws InterruptedException, IOException, J assertEquals(OC_INTERFACE_ETH3_CONFIG_TYPE_EXPECTED, ocInterfaceEth3ConfigType); } +/*FIXME uncomment after YANGTOOLS-1575 is resolved @Test public void getListEntryTest() throws InterruptedException, IOException, JSONException { //assert list entry in openconfig-interfaces - interface - eth3, and also if it is only one with that key @@ -174,6 +175,7 @@ public void getListEntryTest() throws InterruptedException, IOException, JSONExc LOG.info("Response: {}", ocInterfaceEth3); JSONAssert.assertEquals(OC_INTERFACE_ETH3_EXPECTED, ocInterfaceEth3, false); } +*/ @Test public void getIncorrectListEntryTest() throws InterruptedException, IOException, JSONException { 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 b41b2a3efd..eb79e91983 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 @@ -152,6 +152,7 @@ public void setContainerTest() throws InterruptedException, IOException, JSONExc restoreDeviceToOriginalState(); } +/*FIXME uncomment after YANGTOOLS-1575 is resolved @Test public void setAugmentedInterfaceListFromOuterModelTest() throws Exception { final String payload = getAugmentedTestInterfaceBody(); @@ -160,6 +161,7 @@ public void setAugmentedInterfaceListFromOuterModelTest() throws Exception { // Assertion assertEquals(HttpURLConnection.HTTP_CREATED, setAugResponse.statusCode()); } +*/ @Test public void setAugmentedDataFromInnerModelTest() throws Exception { @@ -269,6 +271,7 @@ public void deleteLeafTest() throws InterruptedException, IOException, JSONExcep restoreDeviceToOriginalState(); } +/*FIXME uncomment after YANGTOOLS-1575 is resolved @Test public void setSimpleListEntryTest() throws IOException, InterruptedException, JSONException { // Set simple list with @@ -295,6 +298,7 @@ public void setSimpleListEntryTest() throws IOException, InterruptedException, J removeGnmiTestDataContainer(); } +*/ @Test public void setSimpleListEntryInsideContainerTest() throws IOException, InterruptedException, JSONException { @@ -355,6 +359,7 @@ public void setNestedListInWrongWayTest() throws IOException, InterruptedExcepti assertEquals(HttpURLConnection.HTTP_INTERNAL_ERROR, nestedListResponse.statusCode()); } +/*FIXME uncomment after YANGTOOLS-1575 is resolved @Test public void setNestedListTest() throws IOException, InterruptedException, JSONException { // Create data in base list @@ -389,6 +394,7 @@ public void setNestedListTest() throws IOException, InterruptedException, JSONEx removeGnmiTestBaseList(); } +*/ @Test public void setLeafListEntryTest() throws InterruptedException, IOException, JSONException {