summaryrefslogtreecommitdiffstats
path: root/test/csit/tests
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-03-20 13:31:07 -0700
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-03-26 14:31:41 -0700
commitaaa857a6a790016b1442f3c504ae09d4ff8bc353 (patch)
treef6d2f11adc9d1eaec3f419c22b650782283997b6 /test/csit/tests
parentc5e1b81784d10ab3ce5b08d4f863c891726060e8 (diff)
[WIP] CSIT for MUSIC distributed KV store
This patch adds CSIT tests for music distributed KV store repo. Change-Id: I731e102d211884f46401412bc35f60310fbc7019 Issue-ID: INT-446 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'test/csit/tests')
-rw-r--r--test/csit/tests/music/music-distributed-kv-store-suite/__init__.robot2
-rw-r--r--test/csit/tests/music/music-distributed-kv-store-suite/data/register_domain.json3
-rw-r--r--test/csit/tests/music/music-distributed-kv-store-suite/music-distributed-kv-store-test.robot46
3 files changed, 51 insertions, 0 deletions
diff --git a/test/csit/tests/music/music-distributed-kv-store-suite/__init__.robot b/test/csit/tests/music/music-distributed-kv-store-suite/__init__.robot
new file mode 100644
index 000000000..d1da7f385
--- /dev/null
+++ b/test/csit/tests/music/music-distributed-kv-store-suite/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation Integration - Suite 1 \ No newline at end of file
diff --git a/test/csit/tests/music/music-distributed-kv-store-suite/data/register_domain.json b/test/csit/tests/music/music-distributed-kv-store-suite/data/register_domain.json
new file mode 100644
index 000000000..96811ee97
--- /dev/null
+++ b/test/csit/tests/music/music-distributed-kv-store-suite/data/register_domain.json
@@ -0,0 +1,3 @@
+{
+ "domain":"test_domain"
+} \ No newline at end of file
diff --git a/test/csit/tests/music/music-distributed-kv-store-suite/music-distributed-kv-store-test.robot b/test/csit/tests/music/music-distributed-kv-store-suite/music-distributed-kv-store-test.robot
new file mode 100644
index 000000000..bf97fbf67
--- /dev/null
+++ b/test/csit/tests/music/music-distributed-kv-store-suite/music-distributed-kv-store-test.robot
@@ -0,0 +1,46 @@
+*** Settings ***
+Library OperatingSystem
+Library RequestsLibrary
+Library json
+
+Check Distributed KV Store API Docker Container
+ [Documentation] Checks if DKV docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} nexus3.onap.org:10003/onap/music/distributed-kv-store
+
+DKV LoadDefaultProperties
+ [Documentation] Loads default configuration files into Consul
+ Create Session dkv ${DKV_HOSTNAME}:${DKV_PORT}
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= Get Request dkv /v1/config/load-default headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+DKV FetchDefaultProperties
+ [Documentation] Fetches all default keys from Consul
+ Create Session dkv ${DKV_HOSTNAME}:${DKV_PORT}
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= Get Request dkv /v1/getconfigs headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+DKV RegisterDomain
+ [Documentation] Send a POST request to create a domain
+ Create Session dkv ${DKV_HOSTNAME}:${DKV_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}register_domain.json
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= Post Request dkv v1/register data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+*** Keywords ***