summaryrefslogtreecommitdiffstats
path: root/tests-extra/tests/zone/backup_lock/test.py
diff options
context:
space:
mode:
authorDavid VaĊĦek <david.vasek@nic.cz>2024-05-24 19:35:15 +0200
committerDaniel Salzman <daniel.salzman@nic.cz>2024-06-14 17:18:30 +0200
commita675f90dff83aa54a06c5379e568daeb74911c70 (patch)
treef7e76f7f95e453930673461b7c7db6b5e4fe3ce4 /tests-extra/tests/zone/backup_lock/test.py
parentcontrib/files: in remove_file(), remove all cases of directory as a directory (diff)
downloadknot-a675f90dff83aa54a06c5379e568daeb74911c70.tar.xz
knot-a675f90dff83aa54a06c5379e568daeb74911c70.zip
backup: use the force option to overwrite an already existing backupdir
Diffstat (limited to '')
-rw-r--r--tests-extra/tests/zone/backup_lock/test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests-extra/tests/zone/backup_lock/test.py b/tests-extra/tests/zone/backup_lock/test.py
index 1aab2b550..0d2ef8b48 100644
--- a/tests-extra/tests/zone/backup_lock/test.py
+++ b/tests-extra/tests/zone/backup_lock/test.py
@@ -98,6 +98,12 @@ except:
pass
check_log_err(master, "already exists")
+# Attempt to start backup with the "-f" option into already existing backup, expected OK.
+try:
+ master.ctl("-f zone-backup +backupdir %s" % backup_dir, wait=True)
+except:
+ set_err("FORCED BACKUP NOT ALLOWED")
+
# Attempt to start restore from non-existing backup directory, expected (not exists).
try:
master.ctl("zone-restore +backupdir %s" % backup_dir_void, wait=True)