test(fix): Remove options passed in archive backup tests

* Run archive tests only for MariaDB
* Removed and added the options for root and admin passwd because they
  were in the site_config and not in common_ :')
This commit is contained in:
Gavin D'souza 2022-01-13 14:01:50 +05:30
parent d5b3fc04e0
commit 023269d927

View file

@ -349,15 +349,22 @@ class TestCommands(BaseTestCommands):
shutil.rmtree(test_app_path)
@skipIf(
not (frappe.conf.root_password and frappe.conf.admin_password),
not (
frappe.conf.root_password
and frappe.conf.admin_password
and frappe.conf.db_type == "mariadb"
),
"DB Root password and Admin password not set in config"
)
def test_bench_drop_site_should_archive_site(self):
# TODO: Make this test postgres compatible
site = 'test_site.localhost'
self.execute(
f"bench new-site {site} --force --verbose --admin-password {frappe.conf.admin_password} "
f"--mariadb-root-password {frappe.conf.root_password}"
f"bench new-site {site} --force --verbose "
f"--admin-password {frappe.conf.admin_password} "
f"--mariadb-root-password {frappe.conf.root_password} "
f"--db-type {frappe.conf.db_type or 'mariadb'} "
)
self.assertEqual(self.returncode, 0)