]> arthur.barton.de Git - bup.git/commit
metadata: fix test failure with xattrs
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 26 May 2020 22:29:23 +0000 (00:29 +0200)
committerRob Browning <rlb@defaultvalue.org>
Sun, 5 Jul 2020 16:16:22 +0000 (11:16 -0500)
commitf8e4c63b5431fa689a33c8e99bdd14c4db410cc3
tree418764c6e06308b50ba9718790305726105b2690
parent4d61a6859cf2c1c4385fd8ffd3cf3cac43ea525c
metadata: fix test failure with xattrs

The test_apply_to_path_restricted_access() is broken because
the expected string doesn't take into account that it's now
a u'' string (on python2) due to path_msg(), but this doesn't
appear on any non-selinux systems because the original file
never has any xattr, so the test passes, just not on my Fedora
system.

Change the expected message and remove the quote entirely as
it's different between python 2 and 3, and also try to set an
xattr in the test - if that fails, just continue as it used
to be without reading/setting it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/t/tmetadata.py