From e283bd2822ddff64e05473d786b0e17479c13e1a Mon Sep 17 00:00:00 2001 From: c00149107 Date: Wed, 2 Aug 2017 17:34:11 +0800 Subject: Add so csit test Add so csit test Change-Id: I965032a0385721b539c1fbf0d045e32ff600e4b1 Issue-ID:SO-74 Signed-off-by: c00149107 --- .../tests/so/sanity-check/sanity_test_so.robot | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/csit/tests/so/sanity-check/sanity_test_so.robot (limited to 'test/csit/tests/so/sanity-check') diff --git a/test/csit/tests/so/sanity-check/sanity_test_so.robot b/test/csit/tests/so/sanity-check/sanity_test_so.robot new file mode 100644 index 000000000..e53b46c4c --- /dev/null +++ b/test/csit/tests/so/sanity-check/sanity_test_so.robot @@ -0,0 +1,25 @@ +*** settings *** +Resource ../../common.robot +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library HttpLibrary.HTTP + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryservice_url} /api/so/v1/services/5212b49f-fe70-414f-9519-88bec35b3190 +${service_id} +${operation_id} +*** Test Cases *** +soQueryServiceFuncTest + [Documentation] query single service rest test + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${MSB_IP} headers=${headers} + ${resp}= Get Request web_session ${queryservice_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${serviceName}= Convert To String ${response_json['serviceName']} + Should Be Equal ${serviceName} test_so + -- cgit 1.2.3-korg