← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~matsubara/maas/add-ipmi-assertion into lp:~maas-maintainers/maas/qa-lab-tests

 

Diogo Matsubara has proposed merging lp:~matsubara/maas/add-ipmi-assertion into lp:~maas-maintainers/maas/qa-lab-tests.

Requested reviews:
  MAAS Maintainers (maas-maintainers)

For more details, see:
https://code.launchpad.net/~matsubara/maas/add-ipmi-assertion/+merge/138211

This branch checks the power on/off commands worked correctly and changes to the test to fail faster.

-- 
https://code.launchpad.net/~matsubara/maas/add-ipmi-assertion/+merge/138211
Your team MAAS Maintainers is requested to review the proposed merge of lp:~matsubara/maas/add-ipmi-assertion into lp:~maas-maintainers/maas/qa-lab-tests.
=== modified file 'debian/tests/maas-integration.py'
--- debian/tests/maas-integration.py	2012-12-04 14:49:20 +0000
+++ debian/tests/maas-integration.py	2012-12-05 15:29:30 +0000
@@ -259,12 +259,19 @@
             '* Starting domain name service... bind9'))
 
     def power_on(self, ip, user, password):
-        self._run_command(
+        output, err = self._run_command(
             ["ipmipower", "-h", ip, "-u", user, "-p", password, "--on"])
+        self.assertThat(output, Contains("%s: ok" % ip))
 
     def power_off(self, ip, user, password):
-        self._run_command(
+        output, err = self._run_command(
             ["ipmipower", "-h", ip, "-u", user, "-p", password, "--off"])
+        try:
+            self.assertThat(output, Contains("%s: ok" % ip))
+        except:
+            print output
+            print err
+            raise
 
     def _boot_nodes(self):
         # Run ipmipower to boot up nodes.

=== modified file 'debian/tests/maas-package-test'
--- debian/tests/maas-package-test	2012-10-31 00:42:55 +0000
+++ debian/tests/maas-package-test	2012-12-05 15:29:30 +0000
@@ -1,4 +1,4 @@
 #!/bin/sh
 set -e -u
 exec 2>&1
-nosetests --verbose debian/tests/maas-integration.py
+nosetests --verbose --stop debian/tests/maas-integration.py