Windows: Tests are modifying the real user home

Bug #915380 reported by Natalia Bidart
6
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_quota_exceeded
01/12/2012 12:49 PM <DIR> Ubuntu Test One
01/12/2012 12:49 PM <DIR> ñoño

Related branches

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

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/
tests/syncdaemon/test_vm.py:127: old_home = os.environ['HOME']
tests/syncdaemon/test_vm.py:128: os.environ['HOME'] = self.home_dir
tests/syncdaemon/test_vm.py:129: self.addCleanup(os.environ.__setitem__, 'HOME', old_home)
tests/syncdaemon/test_localrescan.py:2266: self.ancestors = self.udf.ancestors # need a fake HOME
tests/syncdaemon/test_action_queue.py:2535: self.old_home = os.environ.get('HOME', None)
tests/syncdaemon/test_action_queue.py:2536: os.environ['HOME'] = self.home
tests/syncdaemon/test_action_queue.py:2542: os.environ.pop('HOME')
tests/syncdaemon/test_action_queue.py:2544: os.environ['HOME'] = self.old_home
tests/platform/linux/eventlog/test_zg_listener.py:376: self._old_home = os.environ['HOME']
tests/platform/linux/eventlog/test_zg_listener.py:377: os.environ['HOME'] = self.home_dir
tests/platform/linux/eventlog/test_zg_listener.py:382: os.environ['HOME'] = self._old_home

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.

Changed in ubuntuone-client:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Natalia Bidart (nataliabidart)
assignee: Natalia Bidart (nataliabidart) → Diego Sarmentero (diegosarmentero)
Changed in ubuntuone-client:
status: Triaged → In Progress
Changed in ubuntuone-client:
status: In Progress → Fix Committed
dobey (dobey)
Changed in ubuntuone-client:
milestone: none → 2.99.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.