Allow setting Karaf log levels on suite basis 76/45476/4
authorVratko Polak <vrpolak@cisco.com>
Mon, 12 Sep 2016 11:14:58 +0000 (13:14 +0200)
committerLuis Gomez <ecelgp@gmail.com>
Fri, 23 Sep 2016 02:59:48 +0000 (02:59 +0000)
+ Usage for netconf cluster entity test.

Change-Id: I34752852e9ab663beed6c9bbda72248aa18f85ce
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
csit/suites/test/alter_log_levels.robot [new file with mode: 0644]
csit/suites/test/revert_log_levels.robot [new file with mode: 0644]
csit/testplans/netconf-clustering.txt

diff --git a/csit/suites/test/alter_log_levels.robot b/csit/suites/test/alter_log_levels.robot
new file mode 100644 (file)
index 0000000..e630bee
--- /dev/null
@@ -0,0 +1,24 @@
+*** Settings ***
+Documentation     For every node, set Karaf log level to ${ALTERNATIVE_KARAF_LOG_LEVEL}.
+...
+...               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
+...
+...
+...               This suite is useful for testing, run it after readiness.
+...               Do not forget to specify other variables if suites afterwards manipulate log level.
+...               Use revert_log_levels.robot to restore log levels to the default value.
+Suite Setup       ClusterManagement.ClusterManagement_Setup
+Default Tags      clustering
+Resource          ${CURDIR}/../../libraries/ClusterManagement.robot
+
+*** Variables ***
+${ALTERNATIVE_KARAF_LOG_LEVEL}    INFO
+
+*** Test Cases ***
+Set_Levels
+    [Documentation]    Issue log:set command on each Karaf.
+    ClusterManagement.Run_Karaf_Command_On_List_Or_All    log:set ${ALTERNATIVE_KARAF_LOG_LEVEL}
diff --git a/csit/suites/test/revert_log_levels.robot b/csit/suites/test/revert_log_levels.robot
new file mode 100644 (file)
index 0000000..76fdab4
--- /dev/null
@@ -0,0 +1,22 @@
+*** Settings ***
+Documentation     For every node, set Karaf log level to ${DEFAULT_KARAF_LOG_LEVEL}.
+...
+...               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
+...
+...
+...               This suite is useful for testing, run it after primary site to kep karaf.log shorter.
+Suite Setup       ClusterManagement.ClusterManagement_Setup
+Default Tags      clustering
+Resource          ${CURDIR}/../../libraries/ClusterManagement.robot
+
+*** Variables ***
+${DEFAULT_KARAF_LOG_LEVEL}    INFO
+
+*** Test Cases ***
+Set_Levels
+    [Documentation]    Issue log:set command on each Karaf.
+    ClusterManagement.Run_Karaf_Command_On_List_Or_All    log:set ${DEFAULT_KARAF_LOG_LEVEL}
index cd4796dee58ea5967db5adb145d9d607861cf01b..44df26c53115c9ebb52033b797fd8550a4fcc8f7 100644 (file)
@@ -7,11 +7,13 @@
 # Place the suites in run order:
 
 # Run non intrusive cluster tests first.
-integration/test/csit/suites/netconf/ready
+integration/test/csit/suites/netconf/ready/netconfready.robot
 integration/test/csit/suites/netconf/clustering/CRUD.robot
 
 # Run the intrusive cluster tests after the non-intrusive ones.
+integration/test/csit/suites/test/alter_log_levels.robot
 integration/test/csit/suites/netconf/clustering/entity.robot
+integration/test/csit/suites/test/revert_log_levels.robot
 integration/test/csit/suites/netconf/clustering/outages.robot
 
 # Repeat the CRUD test suite again to try to detect breakage caused by