diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-09-28 18:36:51 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-09-28 18:36:51 +0000 |
commit | 9da6efdb9f5a84a4463e1587d5c02b19c9c7a17a (patch) | |
tree | 5490ededb80d725185b3490559b7e48ab4365359 /rdiff-backup/testing/roottest.py | |
parent | 0845027e12bcb65389d28bb87e3a2ba5f862a78d (diff) | |
download | rdiff-backup-9da6efdb9f5a84a4463e1587d5c02b19c9c7a17a.tar.gz |
Mostly another unreadable regress fix
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@463 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing/roottest.py')
-rw-r--r-- | rdiff-backup/testing/roottest.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/rdiff-backup/testing/roottest.py b/rdiff-backup/testing/roottest.py index a498ff2..87cad2a 100644 --- a/rdiff-backup/testing/roottest.py +++ b/rdiff-backup/testing/roottest.py @@ -126,6 +126,23 @@ class HalfRoot(unittest.TestCase): rp2_3.chmod(0) return rp1, rp2 + def cause_regress(self, rp): + """Change some of the above to trigger regress""" + rp1_1 = rp.append('foo') + rp1_1.chmod(04) + rp_new = rp.append('lala') + rp_new.write_string('asoentuh') + rp_new.chmod(0) + assert not os.system('chown %s %s' % (user, rp_new.path)) + rp1_3 = rp.append('unreadable_dir') + rp1_3.chmod(0700) + rp1_3_1 = rp1_3.append('file_inside') + rp1_3_1.chmod(01) + rp1_3.chmod(0) + + rbdir = rp.append('rdiff-backup-data') + rbdir.append('current_mirror.2000-12-31T21:33:20-07:00.data').touch() + def test_backup(self): """Test back up, simple restores""" in_rp1, in_rp2 = self.make_dirs() @@ -173,6 +190,12 @@ class HalfRoot(unittest.TestCase): assert rout_perms == 0, rout_perms assert outrp_perms == 0, outrp_perms + self.cause_regress(outrp) + cmd5 = ('su -c "rdiff-backup --check-destination-dir %s" %s' % + (outrp.path, user)) + print "Executing regress: ", cmd5 + assert not os.system(cmd5) + class NonRoot(unittest.TestCase): """Test backing up as non-root user |