diff options
author | 2017-09-08 16:58:57 +0530 | |
---|---|---|
committer | 2017-09-08 17:00:38 +0530 | |
commit | e08b837f99b490d1a0f935e83694945b5947b494 (patch) | |
tree | 95f48f2bd0e6f6c6e7e1dc94466910553491ef7d /test/csit/tests/cli/startup/startup_check.robot | |
parent | 4b48012b0af97da6c5047b9a7e048afaf5ed6f0e (diff) |
CSIT test case for CLI project
CSIT test cases for CLI project to validate the command output.
Change-Id: I13366a1686331749b2d126d3a4cb849424471648
Issue-Id: CLI-35
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'test/csit/tests/cli/startup/startup_check.robot')
-rw-r--r-- | test/csit/tests/cli/startup/startup_check.robot | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/test/csit/tests/cli/startup/startup_check.robot b/test/csit/tests/cli/startup/startup_check.robot index c79da34ba..a10467078 100644 --- a/test/csit/tests/cli/startup/startup_check.robot +++ b/test/csit/tests/cli/startup/startup_check.robot @@ -1,5 +1,13 @@ *** Settings *** Library RequestsLibrary +Library Process + +*** Variables *** + +${cli_exec} docker exec cli onap +${cli_exec_onap_11} docker exec -e CLI_PRODUCT_VERSION=onap-1.1 onap +${cli_exec_onap_10} docker exec -e CLI_PRODUCT_VERSION=onap-1.0 onap +${cli_exec_cli_10} docker exec -e CLI_PRODUCT_VERSION=cli-1.0 onap *** Test Cases *** Liveness Test @@ -7,10 +15,56 @@ Liveness Test Create Session cli http://${CLI_IP}:8080 CheckUrl cli / +Check Cli help + [Documentation] check cli help command + ${cli_cmd_output}= Run Process ${cli_exec} --help shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} ONAP Command-line interface + +Check Cli Version Default + [Documentation] check cli default version + ${cli_cmd_output}= Run Process ${cli_exec} --version shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} : cli-1.0 + +Check Cli Scheam Refresh + [Documentation] check cli schema-refresh command + ${cli_cmd_output}= Run Process ${cli_exec} schema-refresh shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} sl-no + Should Contain ${cli_cmd_output.stdout} command + Should Contain ${cli_cmd_output.stdout} product-version + Should Contain ${cli_cmd_output.stdout} schema + Should Contain ${cli_cmd_output.stdout} version + +Check Cli Schema Validate With Valid Path + [Documentation] check cli schema-validate command with valid path + ${cli_cmd_output}= Run Process ${cli_exec} schema-validate -i -l schema-refresh.yaml shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} sl-no + Should Contain ${cli_cmd_output.stdout} error + +Check Cli Scheam Validate With Invalid Path + [Documentation] check cli version + ${cli_cmd_output}= Run Process ${cli_exec} schema-validate -i -l invalid-yaml-path.yaml shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 1 + Should Contain ${cli_cmd_output.stdout} 0x0007 + +Check Cli Scheam Validate Empty Argument + [Documentation] check cli schema validate with empty argument + ${cli_cmd_output}= Run Process ${cli_exec} schema-validate shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 1 + Should Contain ${cli_cmd_output.stdout} 0x0015 + + *** Keywords *** CheckUrl [Arguments] ${session} ${path} ${resp}= Get Request ${session} ${path} Should Be Equal As Integers ${resp.status_code} 200 - - |