mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-03-12 09:44:09 +00:00
test(backup): ensure we use correct repo folder
This commit is contained in:
parent
d4b2ca14bb
commit
85c90105ea
2 changed files with 5 additions and 1 deletions
|
@ -197,6 +197,7 @@ class ResticBackupper(AbstractBackupper):
|
||||||
output,
|
output,
|
||||||
"parsed messages:",
|
"parsed messages:",
|
||||||
messages,
|
messages,
|
||||||
|
backup_command,
|
||||||
) from error
|
) from error
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -52,9 +52,11 @@ TESTFILE_BODY = "testytest!"
|
||||||
TESTFILE_2_BODY = "testissimo!"
|
TESTFILE_2_BODY = "testissimo!"
|
||||||
REPO_NAME = "test_backup"
|
REPO_NAME = "test_backup"
|
||||||
|
|
||||||
|
REPOFILE_NAME = "totallyunrelated"
|
||||||
|
|
||||||
|
|
||||||
def prepare_localfile_backups(temp_dir):
|
def prepare_localfile_backups(temp_dir):
|
||||||
test_repo_path = path.join(temp_dir, "totallyunrelated")
|
test_repo_path = path.join(temp_dir, REPOFILE_NAME)
|
||||||
assert not path.exists(test_repo_path)
|
assert not path.exists(test_repo_path)
|
||||||
Backups.set_localfile_repo(test_repo_path)
|
Backups.set_localfile_repo(test_repo_path)
|
||||||
|
|
||||||
|
@ -79,6 +81,7 @@ def backups(tmpdir):
|
||||||
# assert not repo_path
|
# assert not repo_path
|
||||||
|
|
||||||
Backups.init_repo()
|
Backups.init_repo()
|
||||||
|
assert Backups.provider().location == str(tmpdir) + "/" + REPOFILE_NAME
|
||||||
yield
|
yield
|
||||||
Backups.erase_repo()
|
Backups.erase_repo()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue