diff options
Diffstat (limited to 'tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot')
-rw-r--r-- | tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot b/tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot index fd54487a..9dccd048 100644 --- a/tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot +++ b/tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot @@ -1,21 +1,39 @@ *** Settings *** -Library RequestsLibrary +Library RequestsLibrary +Resource ../../../../common.robot Resource ./netconf-server-properties.robot *** Keywords *** -Run Healthcheck - [Documentation] Run Healthcheck +Verify That Server Is Healthy + [Documentation] Verify that server is healthy Create Session netconf_server_session ${NETCONF_SERVER_URL} ${resp}= GET On Session netconf_server_session /healthcheck - Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.status_code} 200 Should Be Equal As Strings ${resp.text} UP -Run Readiness - [Documentation] Run Readiness +Verify That Server Is Ready + [Documentation] Verify that server is ready Create Session netconf_server_session ${NETCONF_SERVER_URL} - ${resp}= GET On Session netconf_server_session /readiness - Should Be Equal As Strings ${resp.status_code} 200 + ${resp}= GET On Session netconf_server_session /readiness + Should Be Equal As Strings ${resp.status_code} 200 Should Be Equal As Strings ${resp.text} Ready +Update NetConf Module Configuration + [Documentation] Update module configuration + [Arguments] ${module} ${path_to_data} ${resp_code} + ${data}= Get Data From File ${path_to_data} + Create Session netconf_server_session ${NETCONF_SERVER_URL} + ${resp}= POST On Session netconf_server_session /change_config/${module} data=${data} + Should Be Equal As Strings ${resp.status_code} ${resp_code} + +Verify That Change Is Available In NetConf Module Change Configuration History + [Documentation] Verify that configuration was distributed to Kafka + [Arguments] ${resp_code} + + Create Session netconf_server_session ${NETCONF_SERVER_URL} + ${resp}= GET On Session netconf_server_session /change_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'}] |