]> arthur.barton.de Git - bup.git/commitdiff
Check stat() after attempted restore of nonexistent owner/group in tests.
authorRob Browning <rlb@defaultvalue.org>
Sun, 10 Oct 2010 15:34:44 +0000 (10:34 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 10 Oct 2010 15:34:44 +0000 (10:34 -0500)
lib/bup/t/tmetadata.py

index dba6990ee9adbc6bd093c88a96b67619fb473176..efcfcba99b341b5e280a79ab6d32b9031ac784f8 100644 (file)
@@ -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])