From 17d12b520c1cd037b2627424a263bee7ebef4639 Mon Sep 17 00:00:00 2001 From: Andrey Bienkowski Date: Thu, 2 Dec 2021 17:27:13 +0300 Subject: [PATCH] Forward port: Test that the archive name is not mentioned This test was originally added in #6071 --- src/borg/testsuite/archiver.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index 579224805..7cd982d5c 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -3916,6 +3916,13 @@ def test_strip_components_doesnt_leak(self): res = self.cmd('extract', "--debug", self.repository_location + '::test', '--strip-components', '0') self.assert_true(marker not in res) + def test_do_not_mention_archive_if_you_can_not_find_repo(self): + """https://github.com/borgbackup/borg/issues/6014""" + archive = self.repository_location + '-this-repository-does-not-exist' + '::test' + output = self.cmd('info', archive, exit_code=2, fork=True) + self.assert_in('this-repository-does-not-exist', output) + self.assert_not_in('this-repository-does-not-exist::test', output) + class ArchiverCorruptionTestCase(ArchiverTestCaseBase): def setUp(self):