~ubuntu-branches/ubuntu/intrepid/landscape-client/intrepid-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2009-12-16 10:50:05 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20091216105005-nxlhwviflk73m2yf
Tags: 1.4.0-0ubuntu0.8.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:
17
17
    def test_get_plugins(self):
18
18
        configuration = ManagerConfiguration()
19
19
        configuration.load(["--manager-plugins", "ProcessKiller",
20
 
                            "-d", self.make_dir()])
 
20
                            "-d", self.makeDir()])
21
21
        manager_service = ManagerService(configuration)
22
22
        plugins = manager_service.plugins
23
23
        self.assertEquals(len(plugins), 1)
26
26
    def test_get_all_plugins(self):
27
27
        configuration = ManagerConfiguration()
28
28
        configuration.load(["--manager-plugins", "ALL",
29
 
                            "-d", self.make_dir()])
 
29
                            "-d", self.makeDir()])
30
30
        manager_service = ManagerService(configuration)
31
31
        self.assertEquals(len(manager_service.plugins), 4)
32
32
 
33
33
    def test_include_script_execution(self):
34
34
        configuration = ManagerConfiguration()
35
35
        configuration.load(["--include-manager-plugins", "ScriptExecution",
36
 
                            "-d", self.make_dir()])
 
36
                            "-d", self.makeDir()])
37
37
        manager_service = ManagerService(configuration)
38
38
        self.assertEquals(len(manager_service.plugins), 5)
39
39
 
43
43
        as.
44
44
        """
45
45
        configuration = ManagerConfiguration()
46
 
        configuration.load(["-d", self.make_dir(),
 
46
        configuration.load(["-d", self.makeDir(),
47
47
                            "--script-users", "foo, bar,baz"])
48
48
        self.assertEquals(configuration.get_allowed_script_users(),
49
49
                          ["foo", "bar", "baz"])
54
54
        L{ALL_USERS}.
55
55
        """
56
56
        configuration = ManagerConfiguration()
57
 
        configuration.load(["-d", self.make_dir(),
 
57
        configuration.load(["-d", self.makeDir(),
58
58
                            "--script-users", "\tALL "])
59
59
        self.assertEquals(configuration.get_allowed_script_users(), ALL_USERS)
60
60
 
63
63
        If no script users are specified, the default is 'nobody'.
64
64
        """
65
65
        configuration = ManagerConfiguration()
66
 
        configuration.load(["-d", self.make_dir()])
 
66
        configuration.load(["-d", self.makeDir()])
67
67
        self.assertEquals(configuration.get_allowed_script_users(),
68
68
                          ["nobody"])
69
69
 
75
75
    def setUp(self):
76
76
        super(DeploymentBusTests, self).setUp()
77
77
        configuration = ManagerConfiguration()
78
 
        self.path = self.make_dir()
 
78
        self.path = self.makeDir()
79
79
        configuration.load(["-d", self.path, "--bus", "session",
80
80
                            "--manager-plugins", "ProcessKiller"])
81
81
        self.manager_service = ManagerService(configuration)