From: Steven Dake Date: Thu, 6 Sep 2012 20:27:50 +0000 (-0700) Subject: Add a Wordpress+MySQL composed instance functional test case X-Git-Tag: 2014.1~1459 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3b27b1d6b1c4739b8d456703542ec8182ce12277;p=openstack-build%2Fheat-build.git Add a Wordpress+MySQL composed instance functional test case Change-Id: I6a905b186be59c929e530519414e46d222b4ea08 Signed-off-by: Steven Dake --- diff --git a/heat/tests/functional/test_WordPress_Composed_Instances.py b/heat/tests/functional/test_WordPress_Composed_Instances.py new file mode 100644 index 00000000..1f368d95 --- /dev/null +++ b/heat/tests/functional/test_WordPress_Composed_Instances.py @@ -0,0 +1,54 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# + +import util +import verify +import nose +from nose.plugins.attrib import attr +import unittest + + +@attr(speed='slow') +@attr(tag=['func', 'wordpress', 'composed', 'WordPressComposedInstances']) +class WordPressComposedInstancesFunctionalTest(unittest.TestCase): + def setUp(self): + template = 'WordPress_Composed_Instances.template' + + self.func_utils = util.FuncUtils() + + self.func_utils.prepare_jeos('F17', 'x86_64', 'cfntools') + self.func_utils.create_stack(template, 'F17') + self.func_utils.check_cfntools() + self.func_utils.wait_for_provisioning() + self.func_utils.check_user_data(template) + + self.ssh = self.func_utils.get_ssh_client() + + def test_instance(self): + # ensure wordpress was installed by checking for expected + # configuration file over ssh + wp_file = '/etc/wordpress/wp-config.php' + stdin, stdout, sterr = self.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 = self.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) + + self.func_utils.cleanup()