From: Jozef Behran Date: Thu, 19 Nov 2015 14:38:44 +0000 (+0100) Subject: Less sensitive "empty config test" X-Git-Tag: release/lithium-sr3~23 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=0ebf44ad8edd6d4fae6e556ffbdab35948383ae0 Less sensitive "empty config test" Do not store the content of "empty config" but only check that none of "our elements" are not there when they shouldn't. The "check empty config" approach is not valid because the "empty config" stored at the beginning may change when another feature gets installed while the test is still running. Change-Id: Ib28f60a8ae9fdf705599b9db5a0cca6c7e75708b Signed-off-by: Jozef Behran --- diff --git a/csit/suites/netconf/MDSAL/northbound.robot b/csit/suites/netconf/MDSAL/northbound.robot index 0017bf9634..df92fb9d33 100644 --- a/csit/suites/netconf/MDSAL/northbound.robot +++ b/csit/suites/netconf/MDSAL/northbound.robot @@ -47,13 +47,7 @@ Connect_To_ODL_Netconf Get_Config_Running [Documentation] Make sure the configuration has only the default elements in it. - ${reply}= Load_And_Send_Message get-config - BuiltIn.Should_Not_Contain ${reply} name0 - BuiltIn.Should_Not_Contain ${reply} name1 - BuiltIn.Should_Not_Contain ${reply} name2 - BuiltIn.Should_Not_Contain ${reply} name3 - BuiltIn.Should_Not_Contain ${reply} name4 - BuiltIn.Set_Suite_Variable ${empty_config} ${reply} + Check_Test_Objects_Not_Present_In_Config get-config Missing_Message_ID_Attribute [Documentation] Check that messages with missing "message-ID" attribute are rejected with the correct error (RFC 6241, section 4.1). @@ -74,7 +68,7 @@ Edit_Config_Modules_Merge Get_Config_Running_To_Confirm_No_Edit_Before_Commit [Documentation] Make sure the running configuration is still unchanged as the change was not commited yet. - Send_And_Check get-config-no-edit-before-commit ${empty_config} + Check_Test_Objects_Not_Present_In_Config get-config-no-edit-before-commit Commit_Edit [Documentation] Commit the change and check the reply. @@ -109,7 +103,7 @@ Commit_Delete Get_Config_Running_To_Confirm_Delete_After_Commit [Documentation] Check that the element is gone. - Send_And_Check get-config-delete-after-commit ${empty_config} + Check_Test_Objects_Not_Present_In_Config get-config-delete-after-commit Restconf_Get_Modules_Shall_Return_404 [Documentation] Check that "Not Found" is returned when Restconf is asked for the deleted element. @@ -136,7 +130,7 @@ Discard_Changes Get_Config_Candidate_To_Confirm_Discard [Documentation] Check that the element was really discarded. - Send_And_Check get-config-candidate-discard ${empty_config} + Check_Test_Objects_Not_Present_In_Config get-config-candidate-discard Edit_Config_Modules_Multiple_Modules_Merge_1 [Documentation] Create the element with "name2" subelement again and check the reply. @@ -336,6 +330,16 @@ Teardown_Everything Close_ODL_Netconf_Connection RequestsLibrary.Delete_All_Sessions +Check_Test_Objects_Not_Present_In_Config + [Arguments] ${name} + [Documentation] Use dataset with the specified name to get the configuration and check that none of our test objects are there. + ${reply}= Load_And_Send_Message ${name} + BuiltIn.Should_Not_Contain ${reply} name0 + BuiltIn.Should_Not_Contain ${reply} name1 + BuiltIn.Should_Not_Contain ${reply} name2 + BuiltIn.Should_Not_Contain ${reply} name3 + BuiltIn.Should_Not_Contain ${reply} name4 + Perform_Test [Arguments] ${name} [Documentation] Load and send the request from the dataset and compare the returned reply to the one stored in the dataset.