Windows: Tests are modifying the real user home
Bug #915380 reported by
Natalia Bidart
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu One Client |
Fix Released
|
High
|
Diego Sarmentero |
Bug Description
All these dirs were created by a test run:
01/12/2012 12:49 PM <DIR> other
01/12/2012 12:49 PM <DIR> Share it to Me
01/12/2012 12:48 PM <DIR> test_udf_
01/12/2012 12:49 PM <DIR> Ubuntu Test One
01/12/2012 12:49 PM <DIR> ñoño
Related branches
lp:~diegosarmentero/ubuntuone-client/fix-user-home-tests
- Natalia Bidart (community): Approve
- Brian Curtin (community): Approve
-
Diff: 357 lines (+13/-71)13 files modifiedcontrib/testing/testcase.py (+4/-5)
tests/platform/linux/eventlog/test_zg_listener.py (+0/-14)
tests/platform/linux/test_filesystem_notifications.py (+0/-1)
tests/platform/linux/test_vm.py (+4/-2)
tests/platform/test_filesystem_notifications.py (+0/-1)
tests/platform/test_os_helper.py (+3/-6)
tests/platform/test_tools.py (+0/-3)
tests/syncdaemon/test_action_queue.py (+1/-13)
tests/syncdaemon/test_eq_inotify.py (+0/-4)
tests/syncdaemon/test_eventqueue.py (+0/-1)
tests/syncdaemon/test_localrescan.py (+0/-14)
tests/syncdaemon/test_main.py (+1/-0)
tests/syncdaemon/test_vm.py (+0/-7)
Changed in ubuntuone-client: | |
status: | Triaged → In Progress |
Changed in ubuntuone-client: | |
status: | In Progress → Fix Committed |
Changed in ubuntuone-client: | |
milestone: | none → 2.99.3 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
All of these setting of the HOME env needs to be fixed so xdg_home returns the expected path:
nessita@ dali:~/ canonical/ client/ trunk$ grep HOME tests/ n/test_ vm.py:127: old_home = os.environ['HOME'] n/test_ vm.py:128: os.environ['HOME'] = self.home_dir n/test_ vm.py:129: self.addCleanup (os.environ. __setitem_ _, 'HOME', old_home) n/test_ localrescan. py:2266: self.ancestors = self.udf.ancestors # need a fake HOME n/test_ action_ queue.py: 2535: self.old_home = os.environ. get('HOME' , None) n/test_ action_ queue.py: 2536: os.environ['HOME'] = self.home n/test_ action_ queue.py: 2542: os.environ. pop('HOME' ) n/test_ action_ queue.py: 2544: os.environ['HOME'] = self.old_home linux/eventlog/ test_zg_ listener. py:376: self._old_home = os.environ['HOME'] linux/eventlog/ test_zg_ listener. py:377: os.environ['HOME'] = self.home_dir linux/eventlog/ test_zg_ listener. py:382: os.environ['HOME'] = self._old_home
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/platform/
tests/platform/
tests/platform/
Also, ideally, we should make the xdg_home patch in a single base test case. Please analyze if this is possible, and also analyze if this can/should be done in dev tools.