diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2019-07-09 13:35:28 +0200 |
---|---|---|
committer | Pavel Moravec <pmoravec@redhat.com> | 2019-07-09 13:35:28 +0200 |
commit | 3006f467e6e3908193d28d76bddcc372c4b98875 (patch) | |
tree | 0f24cd0b535da0b4bdb7f62791a114ee65da87e6 /tests | |
parent | ba77701624dccf3ba98fee6e9cdb9b9d804068c2 (diff) | |
download | sos-3006f467e6e3908193d28d76bddcc372c4b98875.tar.gz |
[archive] Handle checking container sysroot in _make_leading_paths
Previously, in _make_leading_paths(), checking host file paths did not
account for non / sysroots, for situations where sos is run in a
container and the host's / is actually mounted under /host for example.
This would lead to copy errors when trying to copy symlinks.
This method now will use sysroot if one is set, thus avoiding copy
errors.
Resolves: #1705
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/archive_tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/archive_tests.py b/tests/archive_tests.py index e5b329b5..350220b9 100644 --- a/tests/archive_tests.py +++ b/tests/archive_tests.py @@ -20,7 +20,7 @@ class TarFileArchiveTest(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp() enc = {'encrypt': False} - self.tf = TarFileArchive('test', self.tmpdir, Policy(), 1, enc) + self.tf = TarFileArchive('test', self.tmpdir, Policy(), 1, enc, '/') def tearDown(self): shutil.rmtree(self.tmpdir) @@ -113,6 +113,7 @@ class TarFileArchiveTest(unittest.TestCase): def test_compress(self): self.tf.finalize("auto") + if __name__ == "__main__": unittest.main() |