~dpb/pyjuju/dont-proxy-https

« back to all changes in this revision

Viewing changes to juju/state/tests/test_relation.py

Subordinate support in unit agent lifecycle [r=kapil] [f=805585,963355]

This branch lands the support in the unit agent which allows it to deploy 
subordinate services in its own container.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
from juju.charm.directory import CharmDirectory
14
14
from juju.charm.tests import local_charm_id
15
 
from juju.machine.tests.test_constraints import dummy_constraints
 
15
from juju.machine.tests.test_constraints import (
 
16
    dummy_constraints, series_constraints)
16
17
from juju.charm.tests.test_repository import unbundled_repository
17
18
from juju.lib.pick import pick_attr
18
19
from juju.state.charm import CharmStateManager
801
802
 
802
803
        mysql = yield self.add_service("mysql")
803
804
        log_charm = yield self.get_subordinate_charm()
804
 
        log = yield self.service_manager.add_service_state(
805
 
            "logging", log_charm, dummy_constraints)
806
 
 
 
805
        log = yield self.service_manager.add_service_state("logging",
 
806
                                                           log_charm,
 
807
                                                           dummy_constraints)
807
808
        self.assertTrue(log.is_subordinate())
808
809
 
809
810
        relation_state, service_states = (yield
1360
1361
        murs2 = yield mystate.add_unit_state(mu2)
1361
1362
        lurs2 = yield logstate.add_unit_state(lu2)
1362
1363
 
1363
 
        # setup callbacks and start observing.
1364
1364
        @inlineCallbacks
1365
1365
        def verify_watch(urs, expected):
1366
1366
            checker = WatchChecker(self)