Suite for checking 'feature:install' one by one. 33/38133/55
authorDusan Spielmann <dusan.spielmann@pantheon.tech>
Wed, 27 Apr 2016 08:34:28 +0000 (10:34 +0200)
committerAndrej Marcinek <amarcine@cisco.com>
Tue, 22 Nov 2016 11:31:58 +0000 (12:31 +0100)
Add scriptplan with memory configuration.
Add critical tag.
Add keywords for creating karaf console connection and installing feature
using active connection.

Change-Id: Ic6d0368a81516ed7c08d97617a8a70e865e77403
Signed-off-by: Dusan Spielmann <dusan.spielmann@pantheon.tech>
Signed-off-by: lbuckuli <lbuckuli@cisco.com>
Signed-off-by: Andrej Marcinek <amarcine@cisco.com>
csit/libraries/KarafKeywords.robot
csit/scriptplans/distribution-userfeatures.txt [new file with mode: 0644]
csit/suites/distribution/Karaf_Sequence_Install.robot [new file with mode: 0644]
csit/testplans/distribution-userfeatures.txt

index 1590f071cd2a0ff65c4ec90398b8cd2101fdd4cc..898239094bb3992d68ba9168a8e587e96bcaa186 100644 (file)
@@ -83,6 +83,15 @@ Install a Feature
     Log    ${output}
     [Return]    ${output}
 
+Install a Feature Using Active Connection
+    [Arguments]    ${feature_name}
+    [Documentation]    Will Install the given ${feature_name} using active connection
+    ${cmd}=    BuiltIn.Set_Variable    feature:install ${feature_name}
+    Write    ${cmd}
+    ${output}    SSHLibrary.Read_Until    ${KARAF_PROMPT}
+    Log    ${output}
+    [Return]    ${output}
+
 Uninstall a Feature
     [Arguments]    ${feature_name}    ${controller}=${ODL_SYSTEM_IP}    ${karaf_port}=${KARAF_SHELL_PORT}    ${timeout}=180
     [Documentation]    Will UnInstall the given ${feature_name}
@@ -109,6 +118,14 @@ Open Controller Karaf Console On Background
     SSHLibrary.Login    ${KARAF_USER}    ${KARAF_PASSWORD}
     [Teardown]    SSHKeywords.Restore Current SSH Connection From Index    ${current_ssh_connection_object.index}
 
+Open Controller Karaf Console With Timeout
+    [Arguments]    ${member_index}=${1}    ${timeout}=3s
+    [Documentation]    Open new connection to karaf console for member index with specified timeout.
+    BuiltIn.Log    ${member_index}
+    ${odl_ip}=    ClusterManagement.Resolve_IP_Address_For_Member    ${member_index}
+    SSHLibrary.Open Connection    ${odl_ip}    port=${KARAF_SHELL_PORT}    prompt=${KARAF_DETAILED_PROMPT}    timeout=${timeout}
+    SSHLibrary.Login    ${KARAF_USER}    ${KARAF_PASSWORD}
+
 Configure Timeout For Karaf Console
     [Arguments]    ${timeout}    ${member_index_list}=${EMPTY}
     [Documentation]    Configure a different timeout for each Karaf console.
diff --git a/csit/scriptplans/distribution-userfeatures.txt b/csit/scriptplans/distribution-userfeatures.txt
new file mode 100644 (file)
index 0000000..4672a4e
--- /dev/null
@@ -0,0 +1,2 @@
+# Place the scripts in run order:
+integration/test/csit/scripts/controllermem_6g.sh
diff --git a/csit/suites/distribution/Karaf_Sequence_Install.robot b/csit/suites/distribution/Karaf_Sequence_Install.robot
new file mode 100644 (file)
index 0000000..cc4f273
--- /dev/null
@@ -0,0 +1,37 @@
+*** Settings ***
+Documentation     Bug 4462 test suite.
+...
+...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...
+...               This program and the accompanying materials are made available under the
+...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
+...               and is available at http://www.eclipse.org/legal/epl-v10.html
+...
+...
+...               Try to detect whether Karaf hangs when trying to install
+...               list of features one by one. Default list is odl-integration-compatible-with-all.
+Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown
+Default Tags      critical    distribution    features
+Resource          ${CURDIR}/../../libraries/ClusterManagement.robot
+Resource          ${CURDIR}/../../libraries/SetupUtils.robot
+Resource          ${CURDIR}/../../libraries/SSHKeywords.robot
+Resource          ${CURDIR}/../../variables/Variables.robot
+Library           XML
+Library           SSHLibrary
+
+*** Variables ***
+${FEATURES_LIST_NAME}    odl-integration-compatible-with-all
+${FEATURE_INSTALL_TIMEOUT}    10m
+
+*** Testcases ***
+Install_Features_One_By_One
+    [Documentation]    Try to install current list of features and check whether Karaf hangs on it or not (bug 4462).
+    SSHKeywords.Open_Connection_To_ODL_System
+    ${actual_version}=    BuiltIn.Evaluate    '''${BUNDLEFOLDER}'''[len("distribution-karaf-"):]
+    SSHLibrary.Get_File    ${WORKSPACE}/${BUNDLEFOLDER}/system/org/opendaylight/integration/features-integration-test/${actual_version}/features-integration-test-${actual_version}-features.xml    features.xml
+    @{features}=    XML.Get_Elements_Texts    features.xml    .feature[@name="${FEATURES_LIST_NAME}"]/feature
+    Collections.Log_List    ${features}
+    KarafKeywords.Open_Controller_Karaf_Console_With_Timeout    ${1}    ${FEATURE_INSTALL_TIMEOUT}
+    : FOR    ${feature}    IN    @{features}
+    \    KarafKeywords.Log_Message_To_Controller_Karaf    Installing feature: ${feature}
+    \    KarafKeywords.Install_a_Feature_Using_Active_Connection    ${feature}
index a549628524fb2d36b2ff8673d973583b87da8d9e..0df12160534582fb7a66a5e8228e1ba03b0bbe73 100644 (file)
@@ -8,3 +8,4 @@
 integration/test/csit/suites/distribution/size.robot
 integration/test/csit/suites/netconf/ready/netconfready.robot
 integration/test/csit/suites/distribution/version.robot
+integration/test/csit/suites/distribution/Karaf_Sequence_Install.robot
\ No newline at end of file