~ubuntu-branches/ubuntu/lucid/landscape-client/lucid

« back to all changes in this revision

Viewing changes to landscape/monitor/tests/test_deployment.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2009-12-16 10:50:05 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20091216105005-bmki8i2of1dmcdkc
Tags: 1.4.0-0ubuntu0.9.10.0
* New upstream release (LP: #497351)

* Bug fixes:
  - Fix landscape daemons fail to start when too many groups are
    available (LP: #456124)
  - Fix landscape programs wake up far too much. (LP: #340843)
  - Fix Package manager fails with 'no such table: task' (LP #465846)
  - Fix test suite leaving temporary files around (LP #476418)
  - Fix the 1hr long wait for user data to be uploaded following a
    resynchronisation (LP #369000)

* Add support for Ubuntu release upgrades:
  - Add helper function to fetch many files at once (LP: #450629)
  - Handle release-upgrade messages in the packagemanager
    plugin (LP: #455217)
  - Add a release-upgrader task handler (LP: #462543)
  - Support upgrade-tool environment variables (LP: #463321)

* Add initial support for Smart package locking:
  - Detect and report changes about Smart package locks (#488108)

* Packaging fixes:
  - Turn unnecessary Pre-Depends on python-gobject into a regular Depends
  - If it's empty, remove /etc/landscape upon purge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from landscape.lib.persist import Persist
2
2
from landscape.reactor import FakeReactor
 
3
from landscape.manager.usermanager import UserManagerDBusObject
3
4
from landscape.monitor.computerinfo import ComputerInfo
4
5
from landscape.monitor.loadaverage import LoadAverage
5
6
from landscape.monitor.deployment import MonitorService, MonitorConfiguration
16
17
    def test_get_plugins(self):
17
18
        configuration = MonitorConfiguration()
18
19
        configuration.load(["--monitor-plugins", "ComputerInfo, LoadAverage",
19
 
                            "-d", self.make_path()])
 
20
                            "-d", self.makeFile()])
20
21
        monitor = MonitorService(configuration)
21
22
        plugins = monitor.plugins
22
23
        self.assertEquals(len(plugins), 2)
26
27
    def test_get_all_plugins(self):
27
28
        configuration = MonitorConfiguration()
28
29
        configuration.load(["--monitor-plugins", "ALL",
29
 
                            "-d", self.make_path()])
 
30
                            "-d", self.makeFile()])
30
31
        monitor = MonitorService(configuration)
31
32
        plugins = monitor.plugins
32
33
        self.assertEquals(len(plugins), 11)
53
54
class DeploymentBusTest(MonitorServiceTest):
54
55
 
55
56
    def test_dbus_reactor_transmitter_installed(self):
 
57
        # The the config to monitor only, because assertTransmitterActive
 
58
        # fires a resynchronize event and the monitor's callback registered
 
59
        # for it would try to get a DBus object published by the manager.
 
60
        self.monitor.registry.config.monitor_only = True
56
61
        return assertTransmitterActive(self, self.broker_service,
57
62
                                       self.monitor.reactor)
58
63