aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/policy/suite1/policy_interface.robot
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-09-27 10:29:30 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-09-27 12:50:28 -0700
commit2d3d8dcf6ef1bd2a161c69d561c629c5ec3f59c4 (patch)
tree652fd47a183c291e96c6721f550a5f63464f6e66 /test/csit/tests/policy/suite1/policy_interface.robot
parente161173e279a73134dda4c2f429605d6c9ee1fe7 (diff)
Move CSIT to integration/csit repo
To facilite branching of CSIT tests, all CSIT test code and scripts are relocated to the integration/csit repo. Change-Id: I6777cd414e43dbf2bfa6215f7e50849e1a6a2e59 Issue-ID: INT-671 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'test/csit/tests/policy/suite1/policy_interface.robot')
-rw-r--r--test/csit/tests/policy/suite1/policy_interface.robot60
1 files changed, 0 insertions, 60 deletions
diff --git a/test/csit/tests/policy/suite1/policy_interface.robot b/test/csit/tests/policy/suite1/policy_interface.robot
deleted file mode 100644
index 791787081..000000000
--- a/test/csit/tests/policy/suite1/policy_interface.robot
+++ /dev/null
@@ -1,60 +0,0 @@
-*** Settings ***
-Documentation The main interface for interacting with Policy. It handles low level stuff like managing the http request library and Policy required fields
-Library eteutils/RequestsClientCert.py
-#Library RequestsClientCert
-Library RequestsLibrary
-Library String
-Library eteutils/JSONUtils.py
-#Library JSONUtils
-Library Collections
-Resource global_properties.robot
-
-*** Variables ***
-${POLICY_HEALTH_CHECK_PATH} /healthcheck
-
-*** Keywords ***
-
-Run Policy Health Check
- [Documentation] Runs Policy Health check
- ${auth}= Create List ${GLOBAL_POLICY_USERNAME} ${GLOBAL_POLICY_PASSWORD}
- Log Creating session ${GLOBAL_POLICY_SERVER_URL}
- ${session}= Create Session policy ${GLOBAL_POLICY_HEALTHCHECK_URL} auth=${auth}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Get Request policy ${POLICY_HEALTH_CHECK_PATH} headers=${headers}
- Log Received response from policy ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Be True ${resp.json()['healthy']}
- @{ITEMS}= Copy List ${resp.json()['details']}
- :FOR ${ELEMENT} IN @{ITEMS}
- \ Should Be Equal As Strings ${ELEMENT['code']} 200
- \ Should Be True ${ELEMENT['healthy']}
-
-Run Policy Put Request
- [Documentation] Runs Policy Put request
- [Arguments] ${data_path} ${data}
- Log Creating session ${GLOBAL_POLICY_SERVER_URL}
- ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_URL}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
- ${resp}= Put Request policy ${data_path} data=${data} headers=${headers}
- Log Received response from policy ${resp.text}
- [Return] ${resp}
-
-Run Policy Delete Request
- [Documentation] Runs Policy Delete request
- [Arguments] ${data_path} ${data}
- Log Creating session ${GLOBAL_POLICY_SERVER_URL}
- ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_URL}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
- ${resp}= Delete Request policy ${data_path} data=${data} headers=${headers}
- Log Received response from policy ${resp.text}
- [Return] ${resp}
-
-Run Policy Get Configs Request
- [Documentation] Runs Policy Get Configs request
- [Arguments] ${data_path} ${data}
- Log Creating session ${GLOBAL_POLICY_SERVER_URL}
- ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_URL}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH}
- ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
- Log Received response from policy ${resp.text}
- [Return] ${resp} \ No newline at end of file