Cbench automation for CI
[integration/test.git] / test / csit / libraries / KarafKeywords.txt
1 *** Settings ***
2 Library           OperatingSystem
3
4 *** Variables ***
5 ${karaf_shell_port}     8101
6
7 *** Keywords ***
8 Verify Feature Is Installed
9     [Documentation]     Will Succeed if the given ${feature_name} is found in the output of "feature:list -i" by
10     ...     ssh'ing to the karaf console running on ${CONTROLLER}
11     [arguments]     ${feature_name}     ${controller}=${CONTROLLER}     ${karaf_port}=${karaf_shell_port}       ${prompt}=${linux_prompt}   ${prompt_timeout}=5s
12     ${output}=  Run     sshpass -p karaf ssh -p ${karaf_port} karaf@${controller} feature:list -i
13     Should Contain  ${output}   ${feature_name}
14
15 Verify Feature Is Not Installed
16     [Documentation]     Will Succeed if the given ${feature_name} is NOT found in the output of "feature:list -i" by
17     ...     ssh'ing to the karaf console running on ${CONTROLLER}
18     [arguments]     ${feature_name}     ${controller}=${CONTROLLER}     ${karaf_port}=${karaf_shell_port}       ${prompt}=${linux_prompt}   ${prompt_timeout}=5s
19     ${output}=  Run     sshpass -p karaf ssh -p ${karaf_port} karaf@${controller} feature:list -i
20     Should Not Contain  ${output}   ${feature_name}