← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~gz/maas/qa-lab-tests-maas-tags into lp:~maas-maintainers/maas/qa-lab-tests

 

Martin Packman has proposed merging lp:~gz/maas/qa-lab-tests-maas-tags into lp:~maas-maintainers/maas/qa-lab-tests.

Requested reviews:
  MAAS Maintainers (maas-maintainers)

For more details, see:
https://code.launchpad.net/~gz/maas/qa-lab-tests-maas-tags/+merge/149652

Idea for adding basic coverage for juju/maas-tags support to integration tests. This will need some polish/pre-testing before landing.

The aim is to catch issues like the regression introduced in juju recently, that is fixed by the following (pending) change:

<https://code.launchpad.net/~hazmat/juju/maas-tags-redux/+merge/148876>

We could aim at to doing some more complex things with tags, but just checking the basics works seems worthwhile.
-- 
https://code.launchpad.net/~gz/maas/qa-lab-tests-maas-tags/+merge/149652
Your team MAAS Maintainers is requested to review the proposed merge of lp:~gz/maas/qa-lab-tests-maas-tags into lp:~maas-maintainers/maas/qa-lab-tests.
=== modified file 'maas-integration.py'
--- maas-integration.py	2013-02-08 14:50:19 +0000
+++ maas-integration.py	2013-02-20 18:32:21 +0000
@@ -415,6 +415,15 @@
     def test_15_check_nodes_ready(self):
         self._wait_nodes(4)
 
+    def test_15.5_apply_tag(self):
+        # Use maas-cli to set a tag on all nodes.
+        output, err = self._run_maas_cli(["tags", "new", "name='all'",
+            "definition='true'", "comment='A tag present on all nodes'"])
+        tag = loads(output)
+        self.assertEqual(tag['name'], "all")
+        # Really it might take a while for tags to get applied, so waiting
+        # for all the nodes to be listed from 'tags' here might make sense.
+
     def setup_juju(self):
         setup_deb_proxy()
         setup_ssh()
@@ -479,9 +488,11 @@
         is_precise = platform.linux_distribution()[2] == 'precise'
         if USE_ARM_NODES and not is_precise:
             self._run_juju_command(
-                ["deploy", "mediawiki", "--constraints", "arch=arm"])
+                ["deploy", "mediawiki",
+                    "--constraints", "arch=arm maas-tags=all"])
         else:
-            self._run_juju_command(["deploy", "mediawiki"])
+            self._run_juju_command(["deploy", "mediawiki",
+                "--constraints", "maas-tags=all"])
         self._run_juju_command(["add-relation", "mediawiki:db", "mysql"])
         self._run_juju_command(["expose", "mediawiki"])
         # Add new unit for test 18: we run that here to


Follow ups