]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat tests : test_WordPress_Single_Instance.py update
authorSteven Hardy <shardy@redhat.com>
Tue, 4 Sep 2012 16:25:29 +0000 (17:25 +0100)
committerSteven Hardy <shardy@redhat.com>
Tue, 4 Sep 2012 16:57:44 +0000 (17:57 +0100)
Update test_WordPress_Single_Instance.py to use the new
verify_wordpress which checks that the wordpress homepage
specified in the stack output looks OK

Change-Id: I9c2c35215ac97f98e62bf1787db3d8645b50c762
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat/tests/functional/test_WordPress_Single_Instance.py

index 486239615b0a97af0533334002563d0ec0a575c4..b8ba741c9981516ceab02778e40ee8a0245a240e 100644 (file)
@@ -13,6 +13,7 @@
 #
 
 import util
+import verify
 import nose
 from nose.plugins.attrib import attr
 
@@ -33,11 +34,20 @@ def test_template():
 
         ssh = func_utils.get_ssh_client()
 
-        # ensure wordpress was installed
+        # ensure wordpress was installed by checking for expected
+        # configuration file over ssh
         wp_file = '/etc/wordpress/wp-config.php'
         stdin, stdout, sterr = ssh.exec_command('ls ' + wp_file)
         result = stdout.readlines().pop().rstrip()
         assert result == wp_file
         print "Wordpress installation detected"
+
+        # Verify the output URL parses as expected, ie check that
+        # the wordpress installation is operational
+        stack_url = func_utils.get_stack_output("WebsiteURL")
+        print "Got stack output WebsiteURL=%s, verifying" % stack_url
+        ver = verify.VerifyStack()
+        assert True == ver.verify_wordpress(stack_url)
+
     finally:
         func_utils.cleanup()