Add CSIT for Netconf Module Configuration Get 66/120166/2
authorTomasz Pietruszkiewicz <tomasz.pietruszkiewicz@nokia.com>
Fri, 2 Apr 2021 12:52:55 +0000 (14:52 +0200)
committerTomasz Pietruszkiewicz <tomasz.pietruszkiewicz@nokia.com>
Fri, 9 Apr 2021 06:08:35 +0000 (08:08 +0200)
Change-Id: Ib7839948b0c15c2e3f9bba5747f93189fc8f3b3e
Issue-ID: INT-1869
Signed-off-by: Tomasz Pietruszkiewicz <tomasz.pietruszkiewicz@nokia.com>
tests/integration/nfsimulator/netconf-server/netconf-server-rest-test.robot
tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot

index fea34b4..21001e5 100644 (file)
@@ -1,6 +1,7 @@
 *** Settings ***
 Documentation     Run healthcheck
 Library              RequestsLibrary
 *** Settings ***
 Documentation     Run healthcheck
 Library              RequestsLibrary
+Library           Collections
 Resource          ./resources/netconf-server-keywords.robot
 
 
 Resource          ./resources/netconf-server-keywords.robot
 
 
@@ -23,4 +24,8 @@ Netconf Module Configuration Update
     Sleep   20s     Wait for message distribution in Kafka
     Verify That Change Is Available In NetConf Module Change Configuration History  200
 
     Sleep   20s     Wait for message distribution in Kafka
     Verify That Change Is Available In NetConf Module Change Configuration History  200
 
-
+Netconf Module Configuration History Get
+    [Tags]      Netconf-Server
+    [Documentation]   Configuration History should be returned
+    Update NetConf Module Configuration  pnf-simulator  ${PNF_SIMULATOR_DATA_XML}  202
+    Verify That Configuration History Is Available  200
\ No newline at end of file
index 9dccd04..43a02e6 100644 (file)
@@ -37,3 +37,13 @@ Verify That Change Is Available In NetConf Module Change Configuration History
     Should Be Equal As Strings    ${resp.status_code}    ${resp_code}
     ${actual_data}=  Convert To String  ${resp.json()}
     Should Be Equal  ${actual_data}  [{u'new': {u'path': u'/pnf-simulator:config/itemValue1', u'value': 42}, u'type': u'ChangeCreated'}, {u'new': {u'path': u'/pnf-simulator:config/itemValue2', u'value': 35}, u'type': u'ChangeCreated'}]
     Should Be Equal As Strings    ${resp.status_code}    ${resp_code}
     ${actual_data}=  Convert To String  ${resp.json()}
     Should Be Equal  ${actual_data}  [{u'new': {u'path': u'/pnf-simulator:config/itemValue1', u'value': 42}, u'type': u'ChangeCreated'}, {u'new': {u'path': u'/pnf-simulator:config/itemValue2', u'value': 35}, u'type': u'ChangeCreated'}]
+
+Verify That Configuration History Is Available
+    [Documentation]  Verify that configuration is available
+    [Arguments]   ${resp_code}
+
+    Create Session    netconf_server_session    ${NETCONF_SERVER_URL}
+    ${resp}=  GET On Session  netconf_server_session  /get_config/pnf-simulator
+    Should Be Equal As Strings    ${resp.status_code}    ${resp_code}
+    Dictionary Should Contain Item   ${resp.json()['config']}  itemValue1  ${42}
+    Dictionary Should Contain Item   ${resp.json()['config']}  itemValue2  ${35}