[Debian-ha-commits] [pcs] 02/03: debian/tests: run pcs python testsuite

Valentin Vidic vvidic-guest at moszumanska.debian.org
Tue Jun 28 14:04:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

vvidic-guest pushed a commit to branch master
in repository pcs.

commit 5eeea09a7b8cd393f8e60ba41adc1bdb297fee38
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date:   Tue Jun 28 15:26:27 2016 +0200

    debian/tests: run pcs python testsuite
---
 debian/patches/0009-Fix-testsuite.patch | 305 ++++++++++++++++++++++++++++++++
 debian/patches/series                   |   1 +
 debian/tests/control                    |   4 +-
 debian/tests/testsuite-pcs              |  12 ++
 4 files changed, 320 insertions(+), 2 deletions(-)

diff --git a/debian/patches/0009-Fix-testsuite.patch b/debian/patches/0009-Fix-testsuite.patch
new file mode 100644
index 0000000..459d024
--- /dev/null
+++ b/debian/patches/0009-Fix-testsuite.patch
@@ -0,0 +1,305 @@
+--- a/pcs/test/test_cluster.py
++++ b/pcs/test/test_cluster.py
+@@ -173,7 +173,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """
+@@ -232,7 +232,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -378,7 +378,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -423,7 +423,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -464,7 +464,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -510,7 +510,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -552,7 +552,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -587,7 +587,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -635,7 +635,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -681,7 +681,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -722,7 +722,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -772,7 +772,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -818,7 +818,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -1217,7 +1217,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -1338,7 +1338,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -1397,7 +1397,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -1456,7 +1456,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -1517,7 +1517,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -1583,7 +1583,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -1648,7 +1648,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -1713,7 +1713,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -1802,7 +1802,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -2381,7 +2381,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+@@ -2620,7 +2620,7 @@
+ 
+ logging {
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+ }
+ """)
+--- a/pcs/test/test_lib_corosync_config_parser.py
++++ b/pcs/test/test_lib_corosync_config_parser.py
+@@ -1020,7 +1020,7 @@
+ 	# Log to a log file. When set to "no", the "logfile" option
+ 	# must not be set.
+ 	to_logfile: yes
+-	logfile: /var/log/cluster/corosync.log
++	logfile: /var/log/corosync/corosync.log
+ 	# Log to the system log daemon. When in doubt, set to yes.
+ 	to_syslog: yes
+ 	# Log debug messages (very verbose). When in doubt, leave off.
+@@ -1060,7 +1060,7 @@
+     fileline: off
+     to_stderr: no
+     to_logfile: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     to_syslog: yes
+     debug: off
+     timestamp: on
+@@ -1097,7 +1097,7 @@
+ 	fileline: off
+ 	to_logfile: yes
+ 	to_syslog: yes
+-	logfile: /var/log/cluster/corosync.log
++	logfile: /var/log/corosync/corosync.log
+ 	debug: off
+ 	timestamp: on
+ 	logger_subsys {
+@@ -1155,7 +1155,7 @@
+     fileline: off
+     to_logfile: yes
+     to_syslog: yes
+-    logfile: /var/log/cluster/corosync.log
++    logfile: /var/log/corosync/corosync.log
+     debug: off
+     timestamp: on
+ 
+--- a/pcs/test/test_stonith.py
++++ b/pcs/test/test_stonith.py
+@@ -188,7 +188,7 @@
+ 
+         output, returnVal = pcs(
+             temp_cib,
+-            "stonith create f4 fence_xvm meta provides=something"
++            "stonith create f4 fence_dummy meta provides=something"
+         )
+         ac(output, "")
+         self.assertEqual(0, returnVal)
+@@ -204,7 +204,7 @@
+  Resource: f3 (class=stonith type=fence_scsi)
+   Meta Attrs: provides=unfencing 
+   Operations: monitor interval=60s (f3-monitor-interval-60s)
+- Resource: f4 (class=stonith type=fence_xvm)
++ Resource: f4 (class=stonith type=fence_dummy)
+   Meta Attrs: provides=something 
+   Operations: monitor interval=60s (f4-monitor-interval-60s)
+ """)
+@@ -237,7 +237,7 @@
+ 
+         output, returnVal = pcs(
+             temp_cib,
+-            "stonith create f4 fence_xvm meta provides=something"
++            "stonith create f4 fence_dummy meta provides=something"
+         )
+         ac(output, "")
+         self.assertEqual(0, returnVal)
+@@ -256,7 +256,7 @@
+   Attributes: key=abc
+   Meta Attrs: provides=unfencing 
+   Operations: monitor interval=60s (f3-monitor-interval-60s)
+- Resource: f4 (class=stonith type=fence_xvm)
++ Resource: f4 (class=stonith type=fence_dummy)
+   Meta Attrs: provides=something 
+   Operations: monitor interval=60s (f4-monitor-interval-60s)
+ """)
+--- a/pcs/test/test_resource.py
++++ b/pcs/test/test_resource.py
+@@ -2634,7 +2634,7 @@
+         assert output == " Master: D1-master-custom\n  Resource: D1 (class=ocf provider=heartbeat type=Dummy)\n   Operations: monitor interval=60s (D1-monitor-interval-60s)\n Resource: D0 (class=ocf provider=heartbeat type=Dummy)\n  Operations: monitor interval=60s (D0-monitor-interval-60s)\n Resource: D2 (class=ocf provider=heartbeat type=Dummy)\n  Operations: monitor interval=60s (D2-monitor-interval-60s)\n", [output]
+ 
+     def testLSBResource(self):
+-        output, returnVal  = pcs(temp_cib, "resource create --no-default-ops D2 lsb:network")
++        output, returnVal  = pcs(temp_cib, "resource create --no-default-ops D2 lsb:networking")
+         assert returnVal == 0
+         assert output == "", [output]
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 4c83154..542d8c4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 0006-Replace-orderedhash.patch
 0007-Fix-IPv6-bind.patch
 0008-Fix-corosync-log.patch
+0009-Fix-testsuite.patch
diff --git a/debian/tests/control b/debian/tests/control
index 3c39b56..de20892 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,3 @@
-Depends: @, pacemaker, pacemaker-cli-utils
-Tests: status, setup, testsuite-pcsd
+Depends: @, pacemaker, pacemaker-cli-utils, fence-agents, python-mock
+Tests: status, setup, testsuite-pcsd, testsuite-pcs
 Restrictions: needs-root
diff --git a/debian/tests/testsuite-pcs b/debian/tests/testsuite-pcs
new file mode 100755
index 0000000..3842e69
--- /dev/null
+++ b/debian/tests/testsuite-pcs
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+cat >>/etc/hosts <<EOF
+
+192.168.1.1 rh7-1
+192.168.1.2 rh7-2
+192.168.1.3 rh7-3
+EOF
+
+python /usr/lib/python2.7/dist-packages/pcs/test/suite.py 2>&1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/pcs.git



More information about the Debian-HA-Commits mailing list