diff options
Diffstat (limited to 'test/csit')
37 files changed, 955 insertions, 27 deletions
diff --git a/test/csit/plans/music/music-test-plan/setup.sh b/test/csit/plans/music/music-test-plan/setup.sh new file mode 100755 index 000000000..517837c9a --- /dev/null +++ b/test/csit/plans/music/music-test-plan/setup.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# add here eventual scripts needed for music +# +echo "##########################################################"; +echo "#"; +echo "# music scripts calling"; +echo "#"; +echo "##########################################################"; +source ${WORKSPACE}/test/csit/scripts/music/music-scripts/music_script.sh + +# +# add here below the start of all docker containers needed for music CSIT testing +# +echo "##########################################################"; +echo "#"; +echo "# music scripts docker containers spinoff"; +echo "#"; +echo "##########################################################"; + +# +# add here all the configuration steps eventually needed to be carried out for music CSIT testing +# +echo "##########################################################"; +echo "#"; +echo "# music configuration step"; +echo "#"; +echo "##########################################################"; + + +# +# add here all ROBOT_VARIABLES settings +# +echo "##########################################################"; +echo "#"; +echo "# music robot variables settings"; +echo "#"; +echo "##########################################################"; +ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://localhost -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://localhost -v COND_PORT:8091" + +echo ${ROBOT_VARIABLES} + + + diff --git a/test/csit/plans/music/music-test-plan/teardown.sh b/test/csit/plans/music/music-test-plan/teardown.sh new file mode 100755 index 000000000..884a64f71 --- /dev/null +++ b/test/csit/plans/music/music-test-plan/teardown.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +# +# add here below the killing of all docker containers used for music CSIT testing +# +echo "##########################################################"; +echo "#"; +echo "# music scripts docker containers killing"; +echo "#"; +echo "##########################################################"; +# kill-instance.sh <dockercontainername> + diff --git a/test/csit/plans/music/music-test-plan/testplan.txt b/test/csit/plans/music/music-test-plan/testplan.txt new file mode 100644 index 000000000..e53f32674 --- /dev/null +++ b/test/csit/plans/music/music-test-plan/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +music/music-suite diff --git a/test/csit/plans/optf/has/setup.sh b/test/csit/plans/optf/has/setup.sh new file mode 100755 index 000000000..b2c81433c --- /dev/null +++ b/test/csit/plans/optf/has/setup.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# add here eventual scripts needed for optf/has +# +echo "##########################################################"; +echo "#"; +echo "# optf/has scripts calling"; +echo "#"; +echo "##########################################################"; +source ${WORKSPACE}/test/csit/scripts/optf/has/has_script.sh + +# +# add here below the start of all docker containers needed for optf/has CSIT testing +# +echo "##########################################################"; +echo "#"; +echo "# optf/has scripts docker containers spinoff"; +echo "#"; +echo "##########################################################"; + +# +# add here all the configuration steps eventually needed to be carried out for optf/has CSIT testing +# +echo "##########################################################"; +echo "#"; +echo "# optf/has configuration step"; +echo "#"; +echo "##########################################################"; + + +# +# add here all ROBOT_VARIABLES settings +# +echo "##########################################################"; +echo "#"; +echo "# optf/has robot variables settings"; +echo "#"; +echo "##########################################################"; +ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://localhost -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://localhost -v COND_PORT:8091" + +echo ${ROBOT_VARIABLES} + + + diff --git a/test/csit/plans/optf/has/teardown.sh b/test/csit/plans/optf/has/teardown.sh new file mode 100755 index 000000000..b7e6cf075 --- /dev/null +++ b/test/csit/plans/optf/has/teardown.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +# +# add here below the killing of all docker containers used for optf/has CSIT testing +# +echo "##########################################################"; +echo "#"; +echo "# optf/has scripts docker containers killing"; +echo "#"; +echo "##########################################################"; +# kill-instance.sh <dockercontainername> + diff --git a/test/csit/plans/optf/has/testplan.txt b/test/csit/plans/optf/has/testplan.txt new file mode 100644 index 000000000..0f9f84dfe --- /dev/null +++ b/test/csit/plans/optf/has/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +optf/has diff --git a/test/csit/scripts/optf/has/testsample.txt b/test/csit/plans/optf/osdf/sample.txt index 9f4e8d7d6..9f4e8d7d6 100644 --- a/test/csit/scripts/optf/has/testsample.txt +++ b/test/csit/plans/optf/osdf/sample.txt diff --git a/test/csit/scripts/music/music-scripts/music_script.sh b/test/csit/scripts/music/music-scripts/music_script.sh new file mode 100755 index 000000000..f16062ad9 --- /dev/null +++ b/test/csit/scripts/music/music-scripts/music_script.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +echo "######################################################################" +echo "### " +echo "### This is ${WORKSPACE}/test/csit/scripts/music/music-scripts/music_script.sh" +echo "### " +echo "######################################################################" +# +# add here whatever commands is needed to prepare the music CSIT testing +# + diff --git a/test/csit/scripts/optf/has/has_script.sh b/test/csit/scripts/optf/has/has_script.sh new file mode 100755 index 000000000..6f1ddd6e3 --- /dev/null +++ b/test/csit/scripts/optf/has/has_script.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +echo "######################################################################" +echo "### " +echo "### This is ${WORKSPACE}/test/csit/scripts/optf/has/has_script.sh" +echo "### " +echo "######################################################################" +# +# add here whatever commands is needed to prepare the optf/has CSIT testing +# + diff --git a/test/csit/scripts/optf/osdf/testsample.txt b/test/csit/scripts/optf/osdf/testsample.txt new file mode 100644 index 000000000..9f4e8d7d6 --- /dev/null +++ b/test/csit/scripts/optf/osdf/testsample.txt @@ -0,0 +1 @@ +#test diff --git a/test/csit/tests/clamp/APIs/01__Create_CL_TCA.robot b/test/csit/tests/clamp/APIs/02__Create_CL_TCA.robot index 4805ced60..4805ced60 100644 --- a/test/csit/tests/clamp/APIs/01__Create_CL_TCA.robot +++ b/test/csit/tests/clamp/APIs/02__Create_CL_TCA.robot diff --git a/test/csit/tests/clamp/APIs/03__VariousApis.robot b/test/csit/tests/clamp/APIs/03__VariousApis.robot index 47441e894..f875e4c62 100644 --- a/test/csit/tests/clamp/APIs/03__VariousApis.robot +++ b/test/csit/tests/clamp/APIs/03__VariousApis.robot @@ -30,14 +30,6 @@ Get model bpmn by name Should Contain Match ${resp} *Policy_* Should Contain Match ${resp} *EndEvent_* -Get model by name - ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 - Create Session clamp http://localhost:8080 auth=${auth} - ${resp}= Get Request clamp /restservices/clds/v1/clds/model/ClHolmes1 - Dictionary Should Contain Key ${resp.json()} templateName - Dictionary Should Contain Key ${resp.json()} bpmnText - Dictionary Should Contain Key ${resp.json()} imageText - Get model names ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 Create Session clamp http://localhost:8080 auth=${auth} diff --git a/test/csit/tests/clamp/APIs/04__Verify_API_Models.robot b/test/csit/tests/clamp/APIs/04__Verify_API_Models.robot new file mode 100644 index 000000000..f4f762690 --- /dev/null +++ b/test/csit/tests/clamp/APIs/04__Verify_API_Models.robot @@ -0,0 +1,73 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Test Cases *** +Verify HolmesModel1 + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/clds/model/ClHolmes1 + Should Contain Match ${resp} *templateHolmes1* + Should Contain Match ${resp} *DC1* + Should Contain Match ${resp} *DC2* + Should Contain Match ${resp} *Policy1* + Should Contain Match ${resp} *vnfRecipe* + Should Contain Match ${resp} *180* + Should Contain Match ${resp} *345* + Should Contain Match ${resp} *Config Policy name1* + +Verify HolmesModel2 + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/clds/model/ClHolmes2 + Should Contain Match ${resp} *templateHolmes2* + Should Contain Match ${resp} *DC2* + Should Contain Match ${resp} *DC3* + Should Contain Match ${resp} *Policy2* + Should Contain Match ${resp} *enbRecipe* + Should Contain Match ${resp} *reset* + Should Contain Match ${resp} *360* + Should Contain Match ${resp} *345* + Should Contain Match ${resp} *Config Policy Name2* + +Verify TCAModel1 + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/clds/model/ClTCA1 + Should Contain Match ${resp} *templateTCA1* + Should Contain Match ${resp} *vnfRecipe* + Should Contain Match ${resp} *DC1* + Should Contain Match ${resp} *DC2* + Should Contain Match ${resp} *Policy3* + Should Contain Match ${resp} *345* + Should Contain Match ${resp} *200* + Should Contain Match ${resp} *ONSET* + +Verify TCAModel2 + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/clds/model/ClTCA2 + Should Contain Match ${resp} *templateTCA2* + Should Contain Match ${resp} *vnfRecipe* + Should Contain Match ${resp} *DC1* + Should Contain Match ${resp} *DC2* + Should Contain Match ${resp} *DC3* + Should Contain Match ${resp} *Policy4* + Should Contain Match ${resp} *vLoadBalancer* + Should Contain Match ${resp} *345* + Should Contain Match ${resp} *300* + Should Contain Match ${resp} *VM* + +Get model names + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/clds/model-names + Should Contain Match ${resp} *ClHolmes1* + Should Contain Match ${resp} *ClHolmes2* + Should Contain Match ${resp} *ClTCA1* + Should Contain Match ${resp} *ClTCA2* + Should Not Contain Match ${resp} *ClTCA99* + Should Not Contain Match ${resp} *ClHolmes99* + diff --git a/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot b/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot index 7a45dbb80..a94255099 100644 --- a/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot +++ b/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot @@ -7,8 +7,8 @@ Library Selenium2Library Library XvfbRobot *** Variables *** -${SELENIUM_SPEED_FAST} 0.2 seconds -${SELENIUM_SPEED_SLOW} 2 seconds +${SELENIUM_SPEED_FAST} .2 seconds +${SELENIUM_SPEED_SLOW} .5 seconds *** Test Cases *** Get Requests health check ok @@ -41,6 +41,35 @@ Create Model from Menu Select From List By Label id=templateName templateHolmes1 Click Button locator=Create +Set Properties for HolmesModel1 + Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Properties CL timeout=60 + Click Element locator=Properties CL + Select From List By Label id=service vFirewall + Select From List By Label id=vf vFirewall 0 + Select From List By Label id=actionSet VNF + Select From List By Label id=location Data Center 2 Data Center 3 + Click Button locator=Save + +Set Policy Box properties for HolmesModel1 + Wait Until Element Is Visible xpath=//*[@data-element-id="Policy_136qatf"] timeout=60 + Click Element xpath=//*[@data-element-id="Policy_136qatf"] + Click Button locator=New Policy + Input Text locator=//*[@id="pname"] text=Policy1 + Select From List By Label id=recipe Migrate + Input Text locator=maxRetries text=5 + Input Text locator=retryTimeLimit text=240 + Input Text locator=timeout text=390 + Click Button locator=Close + +Set Holmes Box properties for HolmesModel1 + Wait Until Element Is Visible xpath=//*[@data-element-id="Holmes_1gxp0mm"] timeout=60 + Click Element xpath=//*[@data-element-id="Holmes_1gxp0mm"] + Input Text locator=correlationalLogic text=correlational Logic1 + Input Text locator=configPolicyName text=config Policy Name1 + Click Button locator=Save + Save Model from Menu Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 Click Element xpath=//*[@id="navbar"]/ul/li[1]/a diff --git a/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot index e0240721c..caacec36a 100644 --- a/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot +++ b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot @@ -7,8 +7,8 @@ Library Selenium2Library Library XvfbRobot *** Variables *** -${SELENIUM_SPEED_FAST} 0.2 seconds -${SELENIUM_SPEED_SLOW} 2 seconds +${SELENIUM_SPEED_FAST} .2 seconds +${SELENIUM_SPEED_SLOW} .5 seconds *** Test Cases *** Get Requests health check ok @@ -41,6 +41,30 @@ Create Model from Menu Select From List By Label id=templateName templateTCA1 Click Button locator=Create +Set Properties for TCAModel1 + Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Properties CL timeout=60 + Click Element locator=Properties CL + Select From List By Label id=service vLoadBalancer + Select From List By Label id=vf vLoadBalancer 0 + Select From List By Label id=actionSet eNodeB + Select From List By Label id=location Data Center 1 Data Center 3 + Click Button locator=Save + +Set Policy Box properties for TCAModel1 + Wait Until Element Is Visible xpath=//*[@data-element-id="Policy_12lup3h"] timeout=60 + Click Element xpath=//*[@data-element-id="Policy_12lup3h"] + Click Button locator=New Policy + Input Text locator=//*[@id="pname"] text=Policy2 + Select From List By Label id=recipe Reset + Input Text locator=maxRetries text=6 + Input Text locator=retryTimeLimit text=280 + Input Text locator=timeout text=400 + Click Button locator=Close + +### Cannot set TCA box attributes due to element not interractable with Selenium + Save Model from Menu Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 Click Element xpath=//*[@id="navbar"]/ul/li[1]/a diff --git a/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot b/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot new file mode 100644 index 000000000..c866174f1 --- /dev/null +++ b/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot @@ -0,0 +1,44 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library jsons + +*** Test Cases *** +Verify HolmesModel1 + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/clds/model/HolmesModel1 + Should Contain Match ${resp} *templateHolmes1* + Should Contain Match ${resp} *DC2* + Should Contain Match ${resp} *DC3* + Should Contain Match ${resp} *Policy1* + Should Contain Match ${resp} *07e266fc-49ab-4cd7-8378-ca4676f1b9ec* + Should Contain Match ${resp} *migrate* + Should Contain Match ${resp} *240* + Should Contain Match ${resp} *390* + Should Contain Match ${resp} *correlational Logic1* + Should Contain Match ${resp} *config Policy Name1* + +Verify TCAModel1 + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/clds/model/TCAModel1 + Should Contain Match ${resp} *templateTCA1* + Should Contain Match ${resp} *c95b0e7c-c1f0-4287-9928-7964c5377a46* + Should Contain Match ${resp} *enbRecipe* + Should Contain Match ${resp} *DC1* + Should Contain Match ${resp} *DC3* + Should Contain Match ${resp} *Policy2* + Should Contain Match ${resp} *reset* + Should Contain Match ${resp} *280* + Should Contain Match ${resp} *400* + +Get model names + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/clds/model-names + Should Contain Match ${resp} *HolmesModel1* + Should Contain Match ${resp} *TCAModel1* + Should Not Contain Match ${resp} *TCAModel99* + Should Not Contain Match ${resp} *HolmesModel99* diff --git a/test/csit/tests/holmes/testcase/RuleMgt/Rule-Keywords.robot b/test/csit/tests/holmes/testcase/RuleMgt/Rule-Keywords.robot index 182737f54..3ce4be485 100644 --- a/test/csit/tests/holmes/testcase/RuleMgt/Rule-Keywords.robot +++ b/test/csit/tests/holmes/testcase/RuleMgt/Rule-Keywords.robot @@ -34,7 +34,7 @@ traversalRuleAttribute [Arguments] ${responseJsonData} ${expectAttrDic} [Documentation] ${expectAttrDic} : The data type is dictionary; ... key is the name of the attribute, value is the expected value of the attribute. - @{responseRules} Get From Dictionary ${responseJsonData} rules + @{responseRules} Get From Dictionary ${responseJsonData} correlationRules : FOR ${rule} IN @{responseRules} \ log ${rule} \ verifyRuleAttribute ${rule} ${expectAttrDic} diff --git a/test/csit/tests/holmes/testcase/RuleMgt/Rule-Mgt.robot b/test/csit/tests/holmes/testcase/RuleMgt/Rule-Mgt.robot index ac25cbfad..a28bc36ff 100644 --- a/test/csit/tests/holmes/testcase/RuleMgt/Rule-Mgt.robot +++ b/test/csit/tests/holmes/testcase/RuleMgt/Rule-Mgt.robot @@ -8,7 +8,7 @@ Resource Rule-Keywords.robot *** Test Cases *** add_valid_rule [Documentation] Add a valid rule. - ${dict2} create dictionary rulename=youbowu0314 description=create a new rule! content=package rule03140002;\n\nimport java.util.Locale; enabled=1 loopcontrolname=closedControlLoop + ${dict2} create dictionary rulename=youbowu0314 description=create a new rule! content=package ruleqwertasd;\n\nimport java.util.Locale; enabled=1 loopcontrolname=closedControlLoop ${jsonParams} encode ${dict2} ${response} createRule ${jsonParams} ${respJson} to json ${response.content} @@ -34,49 +34,49 @@ query_rule_with_existing_id should not be empty ${RULEID} ${response} queryConditionRule {"ruleid":"${RULEID}"} ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}!=1 fail Can't find the rule with the specified ruleid. query_rule_with_non_existing_id [Documentation] Query a rule with a non-existing ID. - ${response} queryConditionRule {"ruleid":"invalidid"} + ${response} queryConditionRule {"rid":"invalidid"} ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}!=0 fail query_rule_with_partial_existing_name [Documentation] Query rules with (a part of) an existing name. ${response} queryConditionRule {"rulename":"youbowu"} ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}<1 fail Can't find the rule with (a part of) an existing name query_rule_with_partial_non_existing_name [Documentation] Query rules with (a part of) a non-existing name. - ${response} queryConditionRule {"rulename":"zte2017"} + ${response} queryConditionRule {"name":"zte2017"} ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}!=0 fail query_rule_with_vaild_status [Documentation] Query rules with a valid status. ${response} queryConditionRule {"enabled":1} ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}<0 fail Can't find the rule with the status valued 1. query_rule_with_invalid_status [Documentation] Query rules with an invalid status. ${response} queryConditionRule {"enabled":99} ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}!=0 fail query_rule_with_empty_status [Documentation] Query rules with the status left empty. - ${response} queryConditionRule {"enabled":""} + ${response} queryConditionRule {"enabled":null} ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}!=0 fail query_rule_with_combinational_fields @@ -85,7 +85,7 @@ query_rule_with_combinational_fields ${paramJson} encode ${dic} ${response} queryConditionRule ${paramJson} ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}<1 fail Can't find the rules with the combination of different fields. ELSE traversalRuleAttribute ${respJson} ... ${dic} @@ -96,7 +96,7 @@ modify_rule_with_status ${modifyResp} modifyRule ${modifyParam} ${response} queryConditionRule {"ruleid":"${RULEID}"} ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}!=1 fail query rule fails! (can't find the rule modified!) ELSE traversalRuleAttribute ${respJson} ... ${dic} @@ -113,7 +113,7 @@ modify_rule_with_description ${modifyResp} modifyRule ${modifyParam} ${response} queryConditionRule {"ruleid":"${RULEID}"} 1 ${respJson} to json ${response.content} - ${count} get from dictionary ${respJson} totalcount + ${count} get from dictionary ${respJson} totalCount run keyword if ${count}!=1 fail query rule fails! ELSE traversalRuleAttribute ${respJson} ... ${dic} diff --git a/test/csit/tests/music/music-suite/__init__.robot b/test/csit/tests/music/music-suite/__init__.robot new file mode 100644 index 000000000..fb654d7bb --- /dev/null +++ b/test/csit/tests/music/music-suite/__init__.robot @@ -0,0 +1,4 @@ +*** Settings *** +Documentation Integration - Suite 1 + + diff --git a/test/csit/tests/music/music-suite/data/createkeyspace-network.json b/test/csit/tests/music/music-suite/data/createkeyspace-network.json new file mode 100644 index 000000000..9514bae92 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/createkeyspace-network.json @@ -0,0 +1,6 @@ +{ + "consistencyInfo":{"type":"eventual"}, + "durabilityOfWrites":"true", + "keyspaceName":"txt", + "replicationInfo":{"class" :"NetworkTopologyStrategy","DC1":"1", "DC2":"1", "DC3":"1"} +} diff --git a/test/csit/tests/music/music-suite/data/createkeyspace-simple.json b/test/csit/tests/music/music-suite/data/createkeyspace-simple.json new file mode 100644 index 000000000..31f4b6a59 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/createkeyspace-simple.json @@ -0,0 +1,6 @@ +{ + "consistencyInfo":{"type":"eventual"}, + "durabilityOfWrites":"true", + "keyspaceName":"txt", + "replicationInfo":{"class" :"SimpleStrategy","replication_factor": 1} +} diff --git a/test/csit/tests/music/music-suite/data/createkeyspace.json b/test/csit/tests/music/music-suite/data/createkeyspace.json new file mode 100644 index 000000000..31f4b6a59 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/createkeyspace.json @@ -0,0 +1,6 @@ +{ + "consistencyInfo":{"type":"eventual"}, + "durabilityOfWrites":"true", + "keyspaceName":"txt", + "replicationInfo":{"class" :"SimpleStrategy","replication_factor": 1} +} diff --git a/test/csit/tests/music/music-suite/data/createtable.json b/test/csit/tests/music/music-suite/data/createtable.json new file mode 100644 index 000000000..71b471630 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/createtable.json @@ -0,0 +1,12 @@ +{ + "clusteringOrder":null, + "consistencyInfo":{"type":"eventual"}, + "fields":{"PRIMARY KEY":"(name)", + "name":"text","job":"text","threadIndex":"int"}, + "keyspaceName":null, + "primaryKey":null, + "properties":null, + "sortingKey":null, + "tableName":null +} + diff --git a/test/csit/tests/music/music-suite/data/deleterow_eventual.json b/test/csit/tests/music/music-suite/data/deleterow_eventual.json new file mode 100644 index 000000000..ed9a28948 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/deleterow_eventual.json @@ -0,0 +1,5 @@ +{ + "consistencyInfo": {"type":"eventual"}, + "timestamp":null, + "ttl":null +} diff --git a/test/csit/tests/music/music-suite/data/dropkeyspace.json b/test/csit/tests/music/music-suite/data/dropkeyspace.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/dropkeyspace.json @@ -0,0 +1 @@ +{} diff --git a/test/csit/tests/music/music-suite/data/droptable.json b/test/csit/tests/music/music-suite/data/droptable.json new file mode 100644 index 000000000..71b471630 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/droptable.json @@ -0,0 +1,12 @@ +{ + "clusteringOrder":null, + "consistencyInfo":{"type":"eventual"}, + "fields":{"PRIMARY KEY":"(name)", + "name":"text","job":"text","threadIndex":"int"}, + "keyspaceName":null, + "primaryKey":null, + "properties":null, + "sortingKey":null, + "tableName":null +} + diff --git a/test/csit/tests/music/music-suite/data/getrow_atomic.json b/test/csit/tests/music/music-suite/data/getrow_atomic.json new file mode 100644 index 000000000..65f9d76f5 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/getrow_atomic.json @@ -0,0 +1,3 @@ +{ + "consistencyInfo": {"type":"atomic"} +} diff --git a/test/csit/tests/music/music-suite/data/insertrow_eventual.json b/test/csit/tests/music/music-suite/data/insertrow_eventual.json new file mode 100644 index 000000000..56e1762e8 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/insertrow_eventual.json @@ -0,0 +1,8 @@ +{ + "consistencyInfo": {"type":"eventual"}, + "row_specification": null, + "timestamp": null, + "ttl": null, + "values":{"name":"emp1","job":"researcher1518791824160","threadIndex":"0"} +} + diff --git a/test/csit/tests/music/music-suite/data/onboard.json b/test/csit/tests/music/music-suite/data/onboard.json new file mode 100644 index 000000000..5c74f82d5 --- /dev/null +++ b/test/csit/tests/music/music-suite/data/onboard.json @@ -0,0 +1,6 @@ +{ +"appname": "lb7254", +"userId": "music", +"password": "music", +"isAAF": "false" +} diff --git a/test/csit/tests/music/music-suite/data/updaterow_atomic.json b/test/csit/tests/music/music-suite/data/updaterow_atomic.json new file mode 100644 index 000000000..782da144f --- /dev/null +++ b/test/csit/tests/music/music-suite/data/updaterow_atomic.json @@ -0,0 +1,7 @@ +{ + "consistencyInfo": {"type":"atomic"}, + "row_specification":null, + "timestamp":null, + "ttl":null, + "values":{"job":"star-wars-actor"} +} diff --git a/test/csit/tests/music/music-suite/data/updaterow_eventual.json b/test/csit/tests/music/music-suite/data/updaterow_eventual.json new file mode 100644 index 000000000..f8b3e9d2e --- /dev/null +++ b/test/csit/tests/music/music-suite/data/updaterow_eventual.json @@ -0,0 +1,7 @@ +{ + "consistencyInfo": {"type":"eventual"}, + "row_specification":null, + "timestamp":null, + "ttl":null, + "values":{"job":"star-wars-actor"} +} diff --git a/test/csit/tests/music/music-suite/music-test.robot b/test/csit/tests/music/music-suite/music-test.robot new file mode 100644 index 000000000..bb94d2955 --- /dev/null +++ b/test/csit/tests/music/music-suite/music-test.robot @@ -0,0 +1,148 @@ +*** Settings *** +Library OperatingSystem +Library RequestsLibrary +Library json + +*** Variables *** +${MESSAGE} {"ping": "ok"} + +#global variables +${generatedAID} + +*** Test Cases *** +Get Music Version + [Documentation] It sends a REST GET request to retrieve the Music.war version + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= Get Request musicaas /MUSIC/rest/v2/version 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 + +Music AddOnBoarding + [Documentation] It sends a REST POST request to Music to Onboard a new application + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}onboard.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/admin/onboardAppWithMusic data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + ${response_json} json.loads ${resp.content} + ${generatedAID}= Convert To String ${response_json['Generated AID']} + Set Global Variable ${generatedAID} + Log To Console generatedAID = ${generatedAID} + Should Be Equal As Integers ${resp.status_code} 200 + +Music CreateKeyspace + [Documentation] It sends a REST POST request to Music to create a new keyspace in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}createkeyspace.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace 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 + +Music CreateTable + [Documentation] It sends a REST POST request to Music to create a new Table in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}createtable.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable 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 + +Music InsertRow + [Documentation] It sends a REST POST request to Music to create a new row in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}insertrow_eventual.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows/?row=emp1 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 + +Music ReadRowJustInserted + [Documentation] It sends a REST GET request to Music to Read the row just inserted in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Get Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 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 + +Music UpdateRowInAtomicWay + [Documentation] It sends a REST PUT request to Music to create a new row in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}updaterow_atomic.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Put Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 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 + +Music ReadRowAfterUpdate + [Documentation] It sends a REST GET request to Music to Read the row just inserted in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Get Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 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 + +Music DeleteRow + [Documentation] It sends a REST DELETE request to Music to delete a row in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}deleterow_eventual.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 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 + +Music DropTable + [Documentation] It sends a REST Delete request to Music to drop one existing Table in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}droptable.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable 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 + +Music DropKeyspace + [Documentation] It sends a REST DELETE request to Music to drop one existing keyspace in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}dropkeyspace.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace 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 + + +Music DeleteOnBoarding + [Documentation] It sends a REST DELETE request to Music to remove a previosly onboarded application + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}onboard.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/admin/onboardAppWithMusic 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 *** + diff --git a/test/csit/tests/optf/has/__init__.robot b/test/csit/tests/optf/has/__init__.robot new file mode 100644 index 000000000..fb654d7bb --- /dev/null +++ b/test/csit/tests/optf/has/__init__.robot @@ -0,0 +1,4 @@ +*** Settings *** +Documentation Integration - Suite 1 + + diff --git a/test/csit/tests/optf/has/data/plan_with_wrong_version.json b/test/csit/tests/optf/has/data/plan_with_wrong_version.json new file mode 100644 index 000000000..9471fbf82 --- /dev/null +++ b/test/csit/tests/optf/has/data/plan_with_wrong_version.json @@ -0,0 +1,175 @@ +{ + "name": "onap optf has plan with wrong version", + "template": { + "conductor_template_version": "yyyy-mm-dd", + "parameters": { + "UCPEHOST": "chcil129snd", + "CUSTOMER":"21014aa2-526b-11e6-beb8-9e71128cae77" + }, + "locations": { + "customer_loc": { + "host_name": { + "get_param": "UCPEHOST" + } + } + }, + "demands": { + "vHNPortalaaS_PRIMARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "HNPORTAL", + "customer_id": {"get_param": "CUSTOMER"} + }, + { + "inventory_provider": "aai", + "inventory_type": "cloud" + } + ], + "vHNPortalaaS_SECONDARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "HNPORTAL", + "customer_id": {"get_param": "CUSTOMER"} + }, + { + "inventory_provider": "aai", + "inventory_type": "cloud" + } + ], + "vHNGWaaS_PRIMARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "HNGATEWAY", + "customer_id": {"get_param": "CUSTOMER"} + }, + { + "inventory_provider": "aai", + "inventory_type": "cloud" + } + ], + "vHNGWaaS_SECONDARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "HNGATEWAY", + "customer_id": {"get_param": "CUSTOMER"} + }, + { + "inventory_provider": "aai", + "inventory_type": "cloud" + } + ], + "vVIGaaS_PRIMARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "VVIG", + "customer_id": {"get_param": "CUSTOMER"} + } + ], + "vVIGaaS_SECONDARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "VVIG", + "customer_id": {"get_param": "CUSTOMER"} + } + ], + "vVIGaaS_PRIMARY_2": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "VVIG", + "customer_id": {"get_param": "CUSTOMER"} + } + ], + "vVIGaaS_SECONDARY_2": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "VVIG", + "customer_id": {"get_param": "CUSTOMER"} + } + ] + }, + "constraints": { + "distance-vvig": { + "type": "distance_to_location", + "demands": [ + "vVIGaaS_SECONDARY_1", + "vVIGaaS_PRIMARY_1" + ], + "properties": { + "distance": "< 5000 km", + "location": "customer_loc" + } + }, + "distance-vgw": { + "type": "distance_to_location", + "demands": [ + "vHNGWaaS_SECONDARY_1", + "vHNGWaaS_PRIMARY_1" + ], + "properties": { + "distance": "< 5000 km", + "location": "customer_loc" + } + }, + "zone-vhngw": { + "type": "zone", + "demands": [ + "vHNGWaaS_SECONDARY_1", + "vHNGWaaS_PRIMARY_1" + ], + "properties": { + "qualifier": "different", + "category": "complex" + } + }, + "zone-vhnportal": { + "type": "zone", + "demands": [ + "vHNPortalaaS_SECONDARY_1", + "vHNPortalaaS_PRIMARY_1" + ], + "properties": { + "qualifier": "different", + "category": "complex" + } + } + }, + "optimization": { + "minimize": { + "sum": [ + { + "product": [ + 1, + { + "distance_between": [ + "customer_loc", + "vVIGaaS_PRIMARY_1" + ] + } + ] + }, + { + "product": [ + 1, + { + "distance_between": [ + "customer_loc", + "vHNGWaaS_PRIMARY_1" + ] + } + ] + } + ] + } + } +}, + "timeout": 5, + "limit": 3 +} diff --git a/test/csit/tests/optf/has/data/plan_without_demand_section.json b/test/csit/tests/optf/has/data/plan_without_demand_section.json new file mode 100644 index 000000000..87a459d87 --- /dev/null +++ b/test/csit/tests/optf/has/data/plan_without_demand_section.json @@ -0,0 +1,93 @@ +{ + "name": "onap optf has plan with wrong version", + "template": { + "conductor_template_version": "2016-11-01", + "parameters": { + "UCPEHOST": "chcil129snd", + "CUSTOMER":"21014aa2-526b-11e6-beb8-9e71128cae77" + }, + "locations": { + "customer_loc": { + "host_name": { + "get_param": "UCPEHOST" + } + } + }, + "constraints": { + "distance-vvig": { + "type": "distance_to_location", + "demands": [ + "vVIGaaS_SECONDARY_1", + "vVIGaaS_PRIMARY_1" + ], + "properties": { + "distance": "< 5000 km", + "location": "customer_loc" + } + }, + "distance-vgw": { + "type": "distance_to_location", + "demands": [ + "vHNGWaaS_SECONDARY_1", + "vHNGWaaS_PRIMARY_1" + ], + "properties": { + "distance": "< 5000 km", + "location": "customer_loc" + } + }, + "zone-vhngw": { + "type": "zone", + "demands": [ + "vHNGWaaS_SECONDARY_1", + "vHNGWaaS_PRIMARY_1" + ], + "properties": { + "qualifier": "different", + "category": "complex" + } + }, + "zone-vhnportal": { + "type": "zone", + "demands": [ + "vHNPortalaaS_SECONDARY_1", + "vHNPortalaaS_PRIMARY_1" + ], + "properties": { + "qualifier": "different", + "category": "complex" + } + } + }, + "optimization": { + "minimize": { + "sum": [ + { + "product": [ + 1, + { + "distance_between": [ + "customer_loc", + "vVIGaaS_PRIMARY_1" + ] + } + ] + }, + { + "product": [ + 1, + { + "distance_between": [ + "customer_loc", + "vHNGWaaS_PRIMARY_1" + ] + } + ] + } + ] + } + } +}, + "timeout": 5, + "limit": 3 +} diff --git a/test/csit/tests/optf/has/optf_has_test.robot b/test/csit/tests/optf/has/optf_has_test.robot new file mode 100644 index 000000000..183cb6859 --- /dev/null +++ b/test/csit/tests/optf/has/optf_has_test.robot @@ -0,0 +1,29 @@ +*** Settings *** +Library OperatingSystem +Library RequestsLibrary +Library json + +*** Variables *** +${MESSAGE} {"ping": "ok"} +${RESP_STATUS} "error" +${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01" +${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand + +#global variables +${generatedPlanId} + +*** Test Cases *** +Get Root Url + [Documentation] It sends a REST GET request to root url + Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= Get Request optf-cond /v1/plans/ 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 *** + + diff --git a/test/csit/tests/optf/osdf/data/sampletest.txt b/test/csit/tests/optf/osdf/data/sampletest.txt new file mode 100644 index 000000000..9f4e8d7d6 --- /dev/null +++ b/test/csit/tests/optf/osdf/data/sampletest.txt @@ -0,0 +1 @@ +#test |