~ubuntu-branches/ubuntu/saucy/heat/saucy

« back to all changes in this revision

Viewing changes to heat/tests/functional/test_WordPress_2_Instances.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Yolanda Robla, Chuck Short
  • Date: 2013-07-22 16:22:29 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130722162229-zzvfu40id94ii0hc
Tags: 2013.2~b2-0ubuntu1
[ Yolanda Robla ]
* debian/tests: added autopkg tests

[ Chuck Short ]
* New upstream release
* debian/control:
  - Add python-pbr to build-depends.
  - Add python-d2to to build-depends.
  - Dropped python-argparse.
  - Add python-six to build-depends.
  - Dropped python-sendfile.
  - Dropped python-nose.
  - Added testrepository.
  - Added python-testtools.
* debian/rules: Run testrepository instead of nosetets.
* debian/patches/removes-lxml-version-limitation-from-pip-requires.patch: Dropped
  no longer needed.
* debian/patches/fix-package-version-detection-when-building-doc.patch: Dropped
  no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
 
#
3
 
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
4
 
#    not use this file except in compliance with the License. You may obtain
5
 
#    a copy of the License at
6
 
#
7
 
#         http://www.apache.org/licenses/LICENSE-2.0
8
 
#
9
 
#    Unless required by applicable law or agreed to in writing, software
10
 
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
 
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
 
#    License for the specific language governing permissions and limitations
13
 
#
14
 
 
15
 
import util
16
 
import verify
17
 
from nose.plugins.attrib import attr
18
 
 
19
 
import unittest
20
 
import os
21
 
 
22
 
 
23
 
@attr(speed='slow')
24
 
@attr(tag=['func', 'wordpress', '2instance', 'ebs', 'F17',
25
 
      'WordPress_2_Instances.template'])
26
 
class WordPress2Instances(unittest.TestCase):
27
 
    def setUp(self):
28
 
        template = 'WordPress_2_Instances.template'
29
 
 
30
 
        stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
31
 
                                   'DBUsername=dbuser',
32
 
                                   'DBPassword=' + os.environ['OS_PASSWORD']])
33
 
 
34
 
        self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
35
 
                                stack_paramstr)
36
 
        self.DatabaseServer = util.Instance(self, 'DatabaseServer')
37
 
        self.WebServer = util.Instance(self, 'WebServer')
38
 
 
39
 
    def tearDown(self):
40
 
        self.stack.cleanup()
41
 
 
42
 
    def test_instance(self):
43
 
        self.stack.create()
44
 
 
45
 
        self.DatabaseServer.wait_for_boot()
46
 
        self.DatabaseServer.check_cfntools()
47
 
        self.DatabaseServer.wait_for_provisioning()
48
 
 
49
 
        self.WebServer.wait_for_boot()
50
 
        self.WebServer.check_cfntools()
51
 
        self.WebServer.wait_for_provisioning()
52
 
 
53
 
        # ensure wordpress was installed
54
 
        self.assertTrue(self.WebServer.file_present
55
 
                        ('/etc/wordpress/wp-config.php'))
56
 
        print "Wordpress installation detected"
57
 
 
58
 
        # Verify the output URL parses as expected, ie check that
59
 
        # the wordpress installation is operational
60
 
        stack_url = self.stack.get_stack_output("WebsiteURL")
61
 
        print "Got stack output WebsiteURL=%s, verifying" % stack_url
62
 
        ver = verify.VerifyStack()
63
 
        self.assertTrue(ver.verify_wordpress(stack_url))