Commit Graph

8 Commits

Author SHA1 Message Date
Alexandre Detiste
fb69627ad3
Use unittest.mock from core python everywhere
mock was an independent module that has been merged into the Python standard library.
2024-02-18 22:15:30 +01:00
Marcus Schäfer
3669d8cad5
Fixed check for extended attributes
Only if libc reports errno 95 Operation not supported the method
should return that extended attributes are not supported. Also
add a debug information about the result of the call to get further
information in the log file
2023-07-25 17:24:36 +02:00
Marcus Schäfer
b7a64febea
Delete (py)xattr module requirement
The required functionality is provided by the core os library
2023-07-20 17:07:08 +02:00
Marcus Schäfer
9c9250ebc4
Support nose and xunit style tests
The modifications in this commit allows the unit tests
to run on both, pytest 6.x (nose test layout) and the new
pytest 7.x (xunit test layout). This Fixes #2072 in a
much nicer way. Thanks much to @smarlowucf
2022-02-26 20:26:18 +01:00
Marcus Schäfer
f163081d5e
Fix use of xattrs for container sync
when syncing data for containers only a subset of xattr
attributes can be applied. This Fixes #2009
2022-01-29 14:23:20 +01:00
Marcus Schäfer
bbb7efdf2f
Added force_trailing_slash argument to sync_data
A speciality of the rsync tool is that it behaves differently
if the given source_dir ends with a '/' or not. If it ends
with a slash the data structure below will be synced to the
target_dir. If it does not end with a slash the source_dir
and its contents are synced to the target_dir. For example:

    source
      └── some_data

1. $ rsync -a source target

    target
      └── source
            └── some_data

2. $ rsync -a source/ target

    target
      └── some_data

The parameter force_trailing_slash in the DataSync::sync_data
method can be used to make sure rsync behaves like shown in
the second case. This Fixes #1786
2021-09-06 11:18:30 +02:00
Marcus Schäfer
bdb7123fa1
Refactor use of logging facility
Use getLogger method instead of a global log object
Also use caplog fixture to capture log messages in
unit tests. This Fixes #1244
2019-10-23 17:54:27 +02:00
David Cassany
4b3a105026
Re-structure unit tests folders
This commit relocates unit tests to a folder structure that matches
the source code structure.

Fixes #1128
2019-10-21 14:00:05 +02:00