~ubuntuone-pqm-team/juju-deployer/python-env

« back to all changes in this revision

Viewing changes to test_deployment.py

  • Committer: Kapil Thangavelu
  • Date: 2013-05-01 04:32:13 UTC
  • Revision ID: kapil@canonical.com-20130501043213-8g444wy3h03wcu1f
rel basic check before deploy, add option for do vcs only, and auto resolve/retry on deploy or as standalone

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
an environment.
20
20
"""
21
21
import base64
 
22
import logging
22
23
import os
23
 
import logging
24
24
import shutil
25
25
import StringIO
26
26
import subprocess
89
89
                {'relations': [['m2', 'x2']]}),
90
90
            {'relations': [['m1', 'x1'], ['m2', 'x2']]})
91
91
 
 
92
    def test_no_rels_in_target(self):
 
93
        self.assertEqual(
 
94
            dict_merge(
 
95
                {'a': 1},
 
96
                {'relations': [['m1', 'x1'], ['m2', 'x2']]}),
 
97
            {'a': 1, 'relations': [['m1', 'x1'], ['m2', 'x2']]})
 
98
 
92
99
 
93
100
class CharmTest(Base):
94
101
 
187
194
 
188
195
class DeploymentTest(Base):
189
196
    def setUp(self):
190
 
        self.output_deploy = self.capture_logging(
191
 
            "deployer.config", level=logging.DEBUG)
192
 
        self.output_charms = self.capture_logging(
193
 
            "deployer.charm", level=logging.DEBUG)
194
 
        self.output_charms = self.capture_logging(
195
 
            "deployer.deploy", level=logging.DEBUG)
 
197
        self.output = setup_logging(
 
198
            debug=True, verbose=True, stream=StringIO.StringIO())
196
199
 
197
200
    def test_deployer(self):
198
201
        d = ConfigStack(["test_data/blog.yaml"]).get('wordpress-prod')