~free.ekanayaka/landscape-client/jaunty-updates-1.4.4-0ubuntu0.9.04

« back to all changes in this revision

Viewing changes to landscape/tests/test_watchdog.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2009-09-21 17:59:31 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090921175931-4ucv40j9ro26i3lm
Tags: 1.3.2.3-0ubuntu0.9.04.0
* New upstream release (LP: #347983):
  - Don't clear the hash_id_requests table upon resynchronize (LP #417122)
  - Include the README file in landscape-client (LP: #396260)
  - Fix client capturing stderr from run_command when constructing
    hash-id-databases url (LP: #397480)
  - Use substvars to conditionally depend on update-motd or
    libpam-modules (LP: #393454)
  - Fix reporting wrong version to the server (LP: #391225)
  - The init script does not wait for the network to be available
    before checking for EC2 user data (LP: #383336)
  - When the broker is restarted by the watchdog, the state of the client
    is inconsistent (LP: #380633)
  - Package stays unknown forever in the client with hash-id-databases
    support (LP: #381356)
  - Standard error not captured when calling smart-update (LP: #387441)
  - Changer calls reporter without switching groups, just user (LP: #388092)
  - Run smart update in the package-reporter instead of having a cronjob (LP: #362355)
  - Package changer does not inherit proxy settings (LP: #381241)
  - The ./test script doesn't work in landscape-client (LP: #381613)
  - The source package should build on all supported releases (LP: #385098)
  - Strip smart update's output (LP: #387331)
  - The fetch() timeout isn't based on activity (#389224)
  - Client can use a UUID of "None" when fetching the hash-id-database (LP: #381291)
  - Registration should use the fqdn rather than just the hostname (LP: #385730)

Show diffs side-by-side

added added

removed removed

Lines of Context:
809
809
        info = getpwnam("landscape")
810
810
        self.expect(info.pw_uid).result(123)
811
811
        self.expect(info.pw_gid).result(456)
812
 
 
813
 
        reactor.spawnProcess(ARGS, KWARGS, uid=123, gid=456)
 
812
        self.expect(info.pw_dir).result("/var/lib/landscape")
 
813
 
 
814
        env = os.environ.copy()
 
815
        env["HOME"] = "/var/lib/landscape"
 
816
        env["USER"] = "landscape"
 
817
        env["LOGNAME"] = "landscape"
 
818
 
 
819
        reactor.spawnProcess(ARGS, KWARGS, env=env, uid=123, gid=456)
814
820
 
815
821
        self.mocker.replay()
816
822
 
1173
1179
        chown(path(), 1234, 5678)
1174
1180
        chown(path("messages"), 1234, 5678)
1175
1181
        chown(path("package"), 1234, 5678)
 
1182
        chown(path("package/hash-id"), 1234, 5678)
1176
1183
        chown(path("custom-graph-scripts"), 1234, 5678)
1177
1184
        chown(path("package/database"), 1234, 5678)
1178
1185
        chown(log_dir, 1234, 5678)
1310
1317
        os.environ["DEBIAN_YO"] = "yo"
1311
1318
        os.environ["DEBCONF_YO"] = "yo"
1312
1319
        os.environ["LANDSCAPE_ATTACHMENTS"] = "some attachments"
 
1320
        os.environ["MAIL"] = "/some/path"
1313
1321
        os.environ["UNRELATED"] = "unrelated"
1314
1322
 
1315
1323
        reactor = FakeReactor()
1318
1326
        self.assertNotIn("DEBIAN_YO", os.environ)
1319
1327
        self.assertNotIn("DEBCONF_YO", os.environ)
1320
1328
        self.assertNotIn("LANDSCAPE_ATTACHMENTS", os.environ)
 
1329
        self.assertNotIn("MAIL", os.environ)
1321
1330
        self.assertEquals(os.environ["UNRELATED"], "unrelated")