diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-08-11 03:34:03 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-08-11 03:34:03 +0000 |
commit | ac41194deb402b5611a624be6837e8527a0fd592 (patch) | |
tree | 001f2038d707f397b0afc108165f6ef1aa1ac771 /rdiff-backup/testing | |
parent | 6407faaf13d62710e524009a5174a5948754ed44 (diff) | |
download | rdiff-backup-ac41194deb402b5611a624be6837e8527a0fd592.tar.gz |
Added lchown to cmodule so rdiff-backup can preserve symlink uid/gid
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@606 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
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""" |