Fixed spurious MDSAL commit tests failures. 87/33487/4
authorJozef Behran <jbehran@cisco.com>
Mon, 25 Jan 2016 15:01:20 +0000 (16:01 +0100)
committerVratko Polák <vrpolak@cisco.com>
Tue, 26 Jan 2016 10:23:04 +0000 (10:23 +0000)
The fixed "commit" operation always returns OK when the
candidate configuration is exactly the same as the running
configuration. Which makes sense as the commit's task is to
turn the running configuration to be exactly the same as the
(currently present) active configuration. However the tests
were expecting the commit to fail in this situation and thus
are now producing spurious failures.

Change-Id: I2f25e3d53a9519a5987e386e7ebe4d7161c0b767
Signed-off-by: Jozef Behran <jbehran@cisco.com>
csit/suites/netconf/MDSAL/northbound.robot
csit/variables/netconf/MDSAL/commit-no-transaction-reply.msg

index 87926f467c8b8f0bef71b4e27e62a55650cdee30..87fc0fc8a6db7eda83d00dbbf76929c2c22c3fcc 100644 (file)
@@ -132,8 +132,8 @@ Restconf_Get_Modules_Shall_Return_404
     BuiltIn.Should_Be_Equal_As_Strings    404    ${response.status_code}
 
 Commit_No_Transaction
-    [Documentation]    Attempt to perform "commit" when there are no changes in the candidate configuration and check that it fails with the correct error.
-    Test_Commit_With_No_Transactions
+    [Documentation]    Attempt to perform "commit" when there are no changes in the candidate configuration and check that it returns OK status.
+    Perform_Test    commit-no-transaction
 
 Edit_Config_Another_Modules_Merge_For_Discard
     [Documentation]    Create an element to be discarded and check the reply.
@@ -268,8 +268,7 @@ Delete_Not_Existing_Module
 
 Commit_Delete_Not_Existing_Module
     [Documentation]    Attempt to commit and check the reply.
-    Test_Commit_With_No_Transactions
-    [Teardown]    Utils.Report_Failure_Due_To_Bug    4455
+    Perform_Test    commit-no-transaction
 
 Remove_Not_Existing_Module
     [Documentation]    Attempt to remove the "module" element again and check that the operation is "silently ignored".
@@ -419,9 +418,3 @@ Send_And_Check
     [Arguments]    ${name}    ${expected}
     ${actual}=    Load_And_Send_Message    ${name}
     BuiltIn.Should_Be_Equal    ${expected}    ${actual}
-
-Test_Commit_With_No_Transactions
-    [Documentation]    Issue a "commit" RPC request and check that it fails with "No current transactions" error.
-    ${reply}=    Load_And_Send_Message    commit-no-transaction
-    ${expected}=    Load_Expected_Reply    commit-no-transaction
-    BuiltIn.Should_Contain    ${reply}    ${expected}
index ee6a9acbc6750aeba7002b04e791fe9288948808..f3f586f39bab98b8c5c2689e4e0c8763e1c4fd9f 100644 (file)
@@ -1,6 +1,4 @@
-<rpc-reply message-id="10" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
-<rpc-error>
-<error-type>application</error-type>
-<error-tag>operation-failed</error-tag>
-<error-severity>error</error-severity>
-<error-message>No candidateTransaction found for session
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="10">
+<ok/>
+</rpc-reply>