diff options
Diffstat (limited to 'rdiff-backup/testing')
-rw-r--r-- | rdiff-backup/testing/eas_aclstest.py | 1 | ||||
-rw-r--r-- | rdiff-backup/testing/roottest.py | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/rdiff-backup/testing/eas_aclstest.py b/rdiff-backup/testing/eas_aclstest.py index a595cfe..4d6535f 100644 --- a/rdiff-backup/testing/eas_aclstest.py +++ b/rdiff-backup/testing/eas_aclstest.py @@ -245,7 +245,6 @@ other::---""") new_acl = AccessControlLists(()) tempdir.chmod(0700) new_acl.read_from_rp(tempdir) - print "@", new_acl assert new_acl.is_basic(), str(new_acl) assert not new_acl == self.sample_acl assert new_acl != self.sample_acl diff --git a/rdiff-backup/testing/roottest.py b/rdiff-backup/testing/roottest.py index 11da994..4950993 100644 --- a/rdiff-backup/testing/roottest.py +++ b/rdiff-backup/testing/roottest.py @@ -39,6 +39,9 @@ class RootTest(unittest.TestCase): This checks for a bug in 0.13.4 where uids and gids would not be restored correctly. + Also test to make sure symlinks get the right ownership. + (Earlier symlink ownership was not preserved.) + """ dirrp = rpath.RPath(Globals.local_connection, "testfiles/root_owner") def make_dir(): @@ -47,17 +50,25 @@ class RootTest(unittest.TestCase): rp2 = dirrp.append('file2') rp3 = dirrp.append('file3') rp4 = dirrp.append('file4') + rp5 = dirrp.append('symlink') rp1.touch() rp2.touch() rp3.touch() rp4.touch() + rp5.symlink('foobar') rp1.chown(2000, 2000) rp2.chown(2001, 2001) rp3.chown(2002, 2002) rp4.chown(2003, 2003) + rp5.chown(2004, 2004) make_dir() - BackupRestoreSeries(1, 1, ['testfiles/root_owner', 'testfiles/empty'], + BackupRestoreSeries(1, 1, ['testfiles/root_owner', 'testfiles/empty', + 'testfiles/root_owner'], compare_ownership = 1) + symrp = rpath.RPath(Globals.local_connection, + 'testfiles/output/symlink') + assert symrp.issym(), symrp + assert symrp.getuidgid() == (2004, 2004), symrp.getuidgid() def test_ownership_mapping(self): """Test --user-mapping-file and --group-mapping-file options""" |