From f0b0e030d6a1c6c82645a4777cf86f6b11e2334c Mon Sep 17 00:00:00 2001 From: Jozef Behran Date: Thu, 28 Jan 2016 10:31:11 +0100 Subject: [PATCH] Detect bug 5125 Attempt to send element from a nonexistent namespace into the configuration will cause NullPointerException. This was reported as bug 5125. Make sure this bug does not return back by adding a test against it. Change-Id: I7754c2a30c5d8940a9c4f554d64111ead1d1a96b Signed-off-by: Jozef Behran --- csit/suites/netconf/MDSAL/northbound.robot | 10 ++++++++++ .../merge-nonexistent-namespace-request.msg | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 csit/variables/netconf/MDSAL/merge-nonexistent-namespace-request.msg diff --git a/csit/suites/netconf/MDSAL/northbound.robot b/csit/suites/netconf/MDSAL/northbound.robot index cc912f5539..33087f7594 100644 --- a/csit/suites/netconf/MDSAL/northbound.robot +++ b/csit/suites/netconf/MDSAL/northbound.robot @@ -66,6 +66,16 @@ Additional_Attributes_In_Message BuiltIn.Should_Contain ${reply} additional="otherthing" BuiltIn.Should_Contain ${reply} xmlns:prefix="http://www.example.com/my-schema-example.html" +Send_Stuff_In_Undefined_Namespace + [Documentation] Try to send something within an undefined namespace and check the reply complains about the nonexistent namespace and element. + ${reply}= Load_And_Send_Message merge-nonexistent-namespace + BuiltIn.Set_Test_Variable ${bugno} 5125 + BuiltIn.Should_Not_Contain ${reply} java.lang.NullPointerException + BuiltIn.Set_Test_Variable ${bugno} ${EMPTY} + BuiltIn.Should_Contain ${reply} urn:this:is:in:a:nonexistent:namespace + BuiltIn.Should_Contain ${reply} does-not-exist + [Teardown] BuiltIn.Run_Keyword_If '${bugno}' != '${EMPTY}' Utils.Report_Failure_Due_To_Bug 5125 + Edit_Config_First_Batch_Merge [Documentation] Request a "merge" operation adding an element in candidate configuration and check the reply. Perform_Test merge-1 diff --git a/csit/variables/netconf/MDSAL/merge-nonexistent-namespace-request.msg b/csit/variables/netconf/MDSAL/merge-nonexistent-namespace-request.msg new file mode 100644 index 0000000000..c9ccbc0bb1 --- /dev/null +++ b/csit/variables/netconf/MDSAL/merge-nonexistent-namespace-request.msg @@ -0,0 +1,18 @@ + + + + + + merge + + + + TOY001 + Some Toy + 2016 + toys + + + + + -- 2.36.6