From 023269d9279dad80afaab6578549fb1d2aacd822 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Thu, 13 Jan 2022 14:01:50 +0530 Subject: [PATCH] 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_ :') --- frappe/tests/test_commands.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/frappe/tests/test_commands.py b/frappe/tests/test_commands.py index 3511b360e4..408d644042 100644 --- a/frappe/tests/test_commands.py +++ b/frappe/tests/test_commands.py @@ -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)