mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-02-02 14:16:38 +00:00
test(backup): ensure we use correct repo folder
This commit is contained in:
parent
d4b2ca14bb
commit
85c90105ea
|
@ -197,6 +197,7 @@ class ResticBackupper(AbstractBackupper):
|
|||
output,
|
||||
"parsed messages:",
|
||||
messages,
|
||||
backup_command,
|
||||
) from error
|
||||
|
||||
@staticmethod
|
||||
|
|
|
@ -52,9 +52,11 @@ TESTFILE_BODY = "testytest!"
|
|||
TESTFILE_2_BODY = "testissimo!"
|
||||
REPO_NAME = "test_backup"
|
||||
|
||||
REPOFILE_NAME = "totallyunrelated"
|
||||
|
||||
|
||||
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)
|
||||
Backups.set_localfile_repo(test_repo_path)
|
||||
|
||||
|
@ -79,6 +81,7 @@ def backups(tmpdir):
|
|||
# assert not repo_path
|
||||
|
||||
Backups.init_repo()
|
||||
assert Backups.provider().location == str(tmpdir) + "/" + REPOFILE_NAME
|
||||
yield
|
||||
Backups.erase_repo()
|
||||
|
||||
|
|
Loading…
Reference in a new issue