From: Rob Browning Date: Sun, 10 Oct 2010 15:34:44 +0000 (-0500) Subject: Check stat() after attempted restore of nonexistent owner/group in tests. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=49bcf73bb2d3f2a0b3fd61809f607710ab4a162d;p=packages%2Fb%2Fbup.git Check stat() after attempted restore of nonexistent owner/group in tests. --- diff --git a/lib/bup/t/tmetadata.py b/lib/bup/t/tmetadata.py index dba6990..efcfcba 100644 --- a/lib/bup/t/tmetadata.py +++ b/lib/bup/t/tmetadata.py @@ -161,6 +161,10 @@ def test_restore_nonexistent_user_group(): m.owner = max([x.pw_name for x in pwd.getpwall()], key=len) + 'x' m.group = max([x.gr_name for x in grp.getgrall()], key=len) + 'x' WVPASSEQ(m.apply_to_path(path, restore_numeric_ids=True), None) + WVPASSEQ(os.stat(path).st_uid, m.uid) + WVPASSEQ(os.stat(path).st_gid, m.gid) WVPASSEQ(m.apply_to_path(path, restore_numeric_ids=False), None) + WVPASSEQ(os.stat(path).st_uid, os.geteuid()) + WVPASSEQ(os.stat(path).st_uid, os.getgid()) finally: subprocess.call(['rm', '-rf', tmpdir])