Updating configuration (#197)
#### Added - [ACME] Display warning about sudo usage when issuing certificate with DNS API validation (require `sudo -E`) #### Changed - [ACME] Resolve domain IP over HTTPS with Cloudflare DNS Resolver - [CORE] Cement Framework updated to v2.10.2 - [SITE] database name = 0 to 16 characters from the site name + 4 randomly generated character - [SITE] database user = 0 to 12 characters from the site name + 4 randomy generated character - [STACK] Improve sysctl tweak deployment #### Fixed - [SITE] https redirection missing on subdomains sites - Issues with digitalocean mariadb repository - Cement Framework output handler issues - [CLEAN] check if Nginx is installed before purging fastcgi or opcache
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseStack(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
|
||||
def test_wo_cli_stack_install_nginx(self):
|
||||
self.app = get_test_app(argv=['stack', 'install', '--nginx'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
|
||||
def test_wo_cli_stack_install_php(self):
|
||||
self.app = get_test_app(argv=['stack', 'install', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
|
||||
def test_wo_cli_stack_install_php73(self):
|
||||
self.app = get_test_app(argv=['stack', 'install', '--php73'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
|
||||
def test_wo_cli_stack_install_mysql(self):
|
||||
self.app = get_test_app(argv=['stack', 'install', '--mysql'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
|
||||
def test_wo_cli_stack_install_wpcli(self):
|
||||
self.app = get_test_app(argv=['stack', 'install', '--wpcli'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
|
||||
def test_wo_cli_stack_install_phpmyadmin(self):
|
||||
self.app = get_test_app(argv=['stack', 'install', '--phpmyadmin'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
|
||||
def test_wo_cli_stack_install_adminer(self):
|
||||
self.app = get_test_app(argv=['stack', 'install', '--adminer'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
|
||||
def test_wo_cli_stack_install_utils(self):
|
||||
self.app = get_test_app(argv=['stack', 'install', '--utils'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
41
tests/cli/13_test_stack_install.py
Normal file
41
tests/cli/13_test_stack_install.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseStack(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_install_nginx(self):
|
||||
with WOTestApp(argv=['stack', 'install', '--nginx']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_install_php(self):
|
||||
with WOTestApp(argv=['stack', 'install', '--php']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_install_php73(self):
|
||||
with WOTestApp(argv=['stack', 'install', '--php73']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_install_mysql(self):
|
||||
with WOTestApp(argv=['stack', 'install', '--mysql']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_install_wpcli(self):
|
||||
with WOTestApp(argv=['stack', 'install', '--wpcli']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_install_phpmyadmin(self):
|
||||
with WOTestApp(argv=['stack', 'install', '--phpmyadmin']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_install_adminer(self):
|
||||
with WOTestApp(argv=['stack', 'install', '--adminer']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_install_utils(self):
|
||||
with WOTestApp(argv=['stack', 'install', '--utils']) as app:
|
||||
app.run()
|
||||
25
tests/cli/14_test_stack_services_stop.py
Normal file
25
tests/cli/14_test_stack_services_stop.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseStackStop(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_stop_nginx(self):
|
||||
with WOTestApp(argv=['stack', 'stop', '--nginx']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_stop_php_fpm(self):
|
||||
with WOTestApp(argv=['stack', 'stop', '--php']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_stop_mysql(self):
|
||||
with WOTestApp(argv=['stack', 'stop', '--mysql']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_stop_all(self):
|
||||
with WOTestApp(argv=['stack', 'stop']) as app:
|
||||
app.run()
|
||||
25
tests/cli/15_test_stack_services_start.py
Normal file
25
tests/cli/15_test_stack_services_start.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseStackStart(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_start_nginx(self):
|
||||
with WOTestApp(argv=['stack', 'start', '--nginx']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_start_php_fpm(self):
|
||||
with WOTestApp(argv=['stack', 'start', '--php']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_start_mysql(self):
|
||||
with WOTestApp(argv=['stack', 'start', '--mysql']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_start_all(self):
|
||||
with WOTestApp(argv=['stack', 'start']) as app:
|
||||
app.run()
|
||||
25
tests/cli/16_test_stack_services_restart.py
Normal file
25
tests/cli/16_test_stack_services_restart.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseStackRestart(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_restart_nginx(self):
|
||||
with WOTestApp(argv=['stack', 'restart', '--nginx']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_restart_php_fpm(self):
|
||||
with WOTestApp(argv=['stack', 'restart', '--php']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_restart_mysql(self):
|
||||
with WOTestApp(argv=['stack', 'restart', '--mysql']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_restart_all(self):
|
||||
with WOTestApp(argv=['stack', 'restart']) as app:
|
||||
app.run()
|
||||
25
tests/cli/17_test_stack_services_status.py
Normal file
25
tests/cli/17_test_stack_services_status.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseStackStatus(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_status_nginx(self):
|
||||
with WOTestApp(argv=['stack', 'status', '--nginx']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_status_php_fpm(self):
|
||||
with WOTestApp(argv=['stack', 'status', '--php']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_status_mysql(self):
|
||||
with WOTestApp(argv=['stack', 'status', '--mysql']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_services_status_all(self):
|
||||
with WOTestApp(argv=['stack', 'status']) as app:
|
||||
app.run()
|
||||
50
tests/cli/18_test_site_create.py
Normal file
50
tests/cli/18_test_site_create.py
Normal file
@@ -0,0 +1,50 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseSiteCreate(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_create_html(self):
|
||||
with WOTestApp(argv=['site', 'create', 'example1.com',
|
||||
'--html']) as app:
|
||||
app.config.set('wo', '', True)
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_create_php(self):
|
||||
with WOTestApp(argv=['site', 'create', 'example2.com',
|
||||
'--php']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_create_mysql(self):
|
||||
with WOTestApp(argv=['site', 'create', 'example3.com',
|
||||
'--mysql']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_create_wp(self):
|
||||
with WOTestApp(argv=['site', 'create', 'example4.com',
|
||||
'--wp']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_create_wpsubdir(self):
|
||||
with WOTestApp(argv=['site', 'create', 'example5.com',
|
||||
'--wpsubdir']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_create_wpsubdomain(self):
|
||||
with WOTestApp(argv=['site', 'create', 'example6.com',
|
||||
'--wpsubdomain']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_create_wpfc(self):
|
||||
with WOTestApp(argv=['site', 'create', 'example8.com',
|
||||
'--wpfc']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_create_wpsc(self):
|
||||
with WOTestApp(argv=['site', 'create', 'example9.com',
|
||||
'--wpsc']) as app:
|
||||
app.run()
|
||||
13
tests/cli/19_test_site_disable.py
Normal file
13
tests/cli/19_test_site_disable.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseSiteDisable(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_disable(self):
|
||||
with WOTestApp(argv=['site', 'disable', 'example2.com']) as app:
|
||||
app.run()
|
||||
13
tests/cli/20_test_site_enable.py
Normal file
13
tests/cli/20_test_site_enable.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseSiteEnable(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_enable(self):
|
||||
with WOTestApp(argv=['site', 'enable', 'example2.com']) as app:
|
||||
app.run()
|
||||
13
tests/cli/21_test_site_info.py
Normal file
13
tests/cli/21_test_site_info.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseSiteInfo(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_info(self):
|
||||
with WOTestApp(argv=['site', 'info', 'example1.com']) as app:
|
||||
app.run()
|
||||
17
tests/cli/22_test_site_list.py
Normal file
17
tests/cli/22_test_site_list.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseSiteList(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_list_enable(self):
|
||||
with WOTestApp(argv=['site', 'list', '--enabled']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_list_disable(self):
|
||||
with WOTestApp(argv=['site', 'list', '--disabled']) as app:
|
||||
app.run()
|
||||
13
tests/cli/23_test_site_show.py
Normal file
13
tests/cli/23_test_site_show.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseSiteShow(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_show_edit(self):
|
||||
with WOTestApp(argv=['site', 'show', 'example1.com']) as app:
|
||||
app.run()
|
||||
49
tests/cli/24_test_site_update.py
Normal file
49
tests/cli/24_test_site_update.py
Normal file
@@ -0,0 +1,49 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseSiteUpdate(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_update_html(self):
|
||||
with WOTestApp(argv=['site', 'update', 'example2.com',
|
||||
'--html']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_update_php(self):
|
||||
with WOTestApp(argv=['site', 'update', 'example1.com',
|
||||
'--php']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_update_mysql(self):
|
||||
with WOTestApp(argv=['site', 'update', 'example1.com',
|
||||
'--html']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_update_wp(self):
|
||||
with WOTestApp(argv=['site', 'update', 'example5.com',
|
||||
'--wp']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_update_wpsubdir(self):
|
||||
with WOTestApp(argv=['site', 'update', 'example4.com',
|
||||
'--wpsubdir']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_update_wpsubdomain(self):
|
||||
with WOTestApp(argv=['site', 'update', 'example7.com',
|
||||
'--wpsubdomain']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_update_wpfc(self):
|
||||
with WOTestApp(argv=['site', 'update', 'example9.com',
|
||||
'--wpfc']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_update_wpsc(self):
|
||||
with WOTestApp(argv=['site', 'update', 'example6.com',
|
||||
'--wpsc']) as app:
|
||||
app.run()
|
||||
29
tests/cli/25_test_clean.py
Normal file
29
tests/cli/25_test_clean.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseClean(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_clean(self):
|
||||
with WOTestApp(argv=['clean']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_clean_fastcgi(self):
|
||||
with WOTestApp(argv=['clean', '--fastcgi']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_clean_all(self):
|
||||
with WOTestApp(argv=['clean', '--all']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_clean_opcache(self):
|
||||
with WOTestApp(argv=['clean', '--opcache']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_clean_redis(self):
|
||||
with WOTestApp(argv=['clean', '--redis']) as app:
|
||||
app.run()
|
||||
66
tests/cli/26_test_debug.py
Normal file
66
tests/cli/26_test_debug.py
Normal file
@@ -0,0 +1,66 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseDebug(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_stop(self):
|
||||
with WOTestApp(argv=['debug', '--stop']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_start(self):
|
||||
with WOTestApp(argv=['debug', '--start']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_php(self):
|
||||
with WOTestApp(argv=['debug', '--php']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_nginx(self):
|
||||
with WOTestApp(argv=['debug', '--nginx']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_rewrite(self):
|
||||
with WOTestApp(argv=['debug', '--rewrite']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_fpm(self):
|
||||
with WOTestApp(argv=['debug', '--fpm']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_mysql(self):
|
||||
with WOTestApp(argv=['debug', '--mysql']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_import_slow_log_interval(self):
|
||||
with WOTestApp(argv=['debug', '--mysql',
|
||||
'--import-slow-log-interval']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_site_name_mysql(self):
|
||||
with WOTestApp(argv=['debug', 'example3.com', '--mysql']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_site_name_wp(self):
|
||||
with WOTestApp(argv=['debug', 'example4.com', '--wp']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_site_name_nginx(self):
|
||||
with WOTestApp(argv=['debug', 'example4.com', '--nginx']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_site_name_start(self):
|
||||
with WOTestApp(argv=['debug', 'example1.com', '--start']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_site_name_stop(self):
|
||||
with WOTestApp(argv=['debug', 'example1.com', '--stop']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_debug_site_name_rewrite(self):
|
||||
with WOTestApp(argv=['debug', 'example1.com', '--rewrite']) as app:
|
||||
app.run()
|
||||
21
tests/cli/27_test_info.py
Normal file
21
tests/cli/27_test_info.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseInfo(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_info_mysql(self):
|
||||
with WOTestApp(argv=['info', '--mysql']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_info_php(self):
|
||||
with WOTestApp(argv=['info', '--php']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_info_nginx(self):
|
||||
with WOTestApp(argv=['info', '--nginx']) as app:
|
||||
app.run()
|
||||
21
tests/cli/28_test_secure.py
Normal file
21
tests/cli/28_test_secure.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseSecure(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_secure_auth(self):
|
||||
with WOTestApp(argv=['secure', '--auth', 'abc', 'superpass']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_secure_port(self):
|
||||
with WOTestApp(argv=['secure', '--port', '22222']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_secure_ip(self):
|
||||
with WOTestApp(argv=['secure', '--ip', '172.16.0.1']) as app:
|
||||
app.run()
|
||||
29
tests/cli/29_test_site_delete.py
Normal file
29
tests/cli/29_test_site_delete.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseSiteDelete(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_detele(self):
|
||||
with WOTestApp(argv=['site', 'delete', 'example1.com',
|
||||
'--no-prompt']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_detele_all(self):
|
||||
with WOTestApp(argv=['site', 'delete', 'example2.com',
|
||||
'--all', '--no-prompt']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_detele_db(self):
|
||||
with WOTestApp(argv=['site', 'delete', 'example3.com',
|
||||
'--db', '--no-prompt']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_site_detele_files(self):
|
||||
with WOTestApp(argv=['site', 'delete', 'example4.com',
|
||||
'--files', '--no-prompt']) as app:
|
||||
app.run()
|
||||
@@ -1,34 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseStack(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_start_nginx(self):
|
||||
self.app = get_test_app(argv=['stack', 'start', '--nginx'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_start_php_fpm(self):
|
||||
self.app = get_test_app(argv=['stack', 'start', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_start_mysql(self):
|
||||
self.app = get_test_app(argv=['stack', 'start', '--mysql'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_start_all(self):
|
||||
self.app = get_test_app(argv=['stack', 'start'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
43
tests/cli/30_test_stack_remove.py
Normal file
43
tests/cli/30_test_stack_remove.py
Normal file
@@ -0,0 +1,43 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseStackRemove(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_remove_admin(self):
|
||||
with WOTestApp(argv=['stack', 'remove', '--admin', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_remove_nginx(self):
|
||||
with WOTestApp(argv=['stack', 'remove', '--nginx', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_remove_php(self):
|
||||
with WOTestApp(argv=['stack', 'remove', '--php', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_remove_mysql(self):
|
||||
with WOTestApp(argv=['stack', 'remove', '--mysql', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_remove_wpcli(self):
|
||||
with WOTestApp(argv=['stack', 'remove', '--wpcli', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_remove_phpmyadmin(self):
|
||||
with WOTestApp(argv=['stack', 'remove',
|
||||
'--phpmyadmin', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_remove_adminer(self):
|
||||
with WOTestApp(
|
||||
argv=['stack', 'remove', '--adminer', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_remove_utils(self):
|
||||
with WOTestApp(argv=['stack', 'remove', '--utils', '--force']) as app:
|
||||
app.run()
|
||||
54
tests/cli/31_test_stack_purge.py
Normal file
54
tests/cli/31_test_stack_purge.py
Normal file
@@ -0,0 +1,54 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import WOTestApp
|
||||
|
||||
|
||||
class CliTestCaseStackPurge(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
with WOTestApp as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_purge_web(self):
|
||||
with WOTestApp(
|
||||
argv=['stack', 'purge', '--web', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_purge_admin(self):
|
||||
with WOTestApp(
|
||||
argv=['stack', 'purge', '--admin', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_purge_nginx(self):
|
||||
with WOTestApp(
|
||||
argv=['stack', 'purge', '--nginx', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_purge_php(self):
|
||||
with WOTestApp(argv=['stack', 'purge',
|
||||
'--php', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_purge_mysql(self):
|
||||
with WOTestApp(argv=['stack', 'purge',
|
||||
'--mysql', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_purge_wpcli(self):
|
||||
with WOTestApp(argv=['stack', 'purge',
|
||||
'--wpcli', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_purge_phpmyadmin(self):
|
||||
with WOTestApp(
|
||||
argv=['stack', 'purge', '--phpmyadmin', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_purge_adminer(self):
|
||||
with WOTestApp(
|
||||
argv=['stack', 'purge', '--adminer', '--force']) as app:
|
||||
app.run()
|
||||
|
||||
def test_wo_cli_stack_purge_utils(self):
|
||||
with WOTestApp(argv=['stack', 'purge',
|
||||
'--utils', '--force']) as app:
|
||||
app.run()
|
||||
@@ -1,34 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseStack(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_status_nginx(self):
|
||||
self.app = get_test_app(argv=['stack', 'status', '--nginx'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_status_php_fpm(self):
|
||||
self.app = get_test_app(argv=['stack', 'status', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_status_mysql(self):
|
||||
self.app = get_test_app(argv=['stack', 'status', '--mysql'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_status_all(self):
|
||||
self.app = get_test_app(argv=['stack', 'status'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,34 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseStack(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_stop_nginx(self):
|
||||
self.app = get_test_app(argv=['stack', 'stop', '--nginx'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_stop_php_fpm(self):
|
||||
self.app = get_test_app(argv=['stack', 'stop', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_stop_mysql(self):
|
||||
self.app = get_test_app(argv=['stack', 'stop', '--mysql'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_stop_all(self):
|
||||
self.app = get_test_app(argv=['stack', 'stop'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,34 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseStack(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_restart_nginx(self):
|
||||
self.app = get_test_app(argv=['stack', 'restart', '--nginx'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_restart_php_fpm(self):
|
||||
self.app = get_test_app(argv=['stack', 'restart', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_restart_mysql(self):
|
||||
self.app = get_test_app(argv=['stack', 'restart', '--mysql'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_restart_all(self):
|
||||
self.app = get_test_app(argv=['stack', 'restart'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,66 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseSite(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_create_html(self):
|
||||
self.app = get_test_app(argv=['site', 'create', 'example1.com',
|
||||
'--html'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_create_php(self):
|
||||
self.app = get_test_app(argv=['site', 'create', 'example2.com',
|
||||
'--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_create_mysql(self):
|
||||
self.app = get_test_app(argv=['site', 'create', 'example3.com',
|
||||
'--mysql'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_create_wp(self):
|
||||
self.app = get_test_app(argv=['site', 'create', 'example4.com',
|
||||
'--wp'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_create_wpsubdir(self):
|
||||
self.app = get_test_app(argv=['site', 'create', 'example5.com',
|
||||
'--wpsubdir'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_create_wpsubdomain(self):
|
||||
self.app = get_test_app(argv=['site', 'create', 'example6.com',
|
||||
'--wpsubdomain'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_create_wpfc(self):
|
||||
self.app = get_test_app(argv=['site', 'create', 'example8.com',
|
||||
'--wpfc'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_create_wpsc(self):
|
||||
self.app = get_test_app(argv=['site', 'create', 'example9.com',
|
||||
'--wpsc'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,16 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseSite(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_info(self):
|
||||
self.app = get_test_app(argv=['site', 'info', 'example1.com'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,22 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseSite(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_list_enable(self):
|
||||
self.app = get_test_app(argv=['site', 'list', '--enabled'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_list_disable(self):
|
||||
self.app = get_test_app(argv=['site', 'list', '--disabled'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,16 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseSite(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_show_edit(self):
|
||||
self.app = get_test_app(argv=['site', 'show', 'example1.com'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,66 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseSite(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_update_html(self):
|
||||
self.app = get_test_app(argv=['site', 'update', 'example2.com',
|
||||
'--html'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_update_php(self):
|
||||
self.app = get_test_app(argv=['site', 'update', 'example1.com',
|
||||
'--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_update_mysql(self):
|
||||
self.app = get_test_app(argv=['site', 'update', 'example1.com',
|
||||
'--html'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_update_wp(self):
|
||||
self.app = get_test_app(argv=['site', 'update', 'example5.com',
|
||||
'--wp'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_update_wpsubdir(self):
|
||||
self.app = get_test_app(argv=['site', 'update', 'example4.com',
|
||||
'--wpsubdir'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_update_wpsubdomain(self):
|
||||
self.app = get_test_app(argv=['site', 'update', 'example7.com',
|
||||
'--wpsubdomain'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_update_wpfc(self):
|
||||
self.app = get_test_app(argv=['site', 'update', 'example9.com',
|
||||
'--wpfc'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_update_wpsc(self):
|
||||
self.app = get_test_app(argv=['site', 'update', 'example6.com',
|
||||
'--wpsc'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,16 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseSite(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_enable(self):
|
||||
self.app = get_test_app(argv=['site', 'enable', 'example2.com'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,16 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseSite(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_disable(self):
|
||||
self.app = get_test_app(argv=['site', 'disable', 'example2.com'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,9 +0,0 @@
|
||||
"""Tests for Example Plugin."""
|
||||
|
||||
from wo.utils.test import WOTestCase
|
||||
|
||||
|
||||
class ExamplePluginTestCase(WOTestCase):
|
||||
def test_load_example_plugin(self):
|
||||
self.app.setup()
|
||||
self.app.plugin.load_plugin('example')
|
||||
@@ -1,34 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseClean(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_clean(self):
|
||||
self.app = get_test_app(argv=['clean'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_clean_fastcgi(self):
|
||||
self.app = get_test_app(argv=['clean', '--fastcgi'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_clean_all(self):
|
||||
self.app = get_test_app(argv=['clean', '--all'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_clean_opcache(self):
|
||||
self.app = get_test_app(argv=['clean', '--opcache'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,95 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseDebug(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_stop(self):
|
||||
self.app = get_test_app(argv=['debug', '--stop'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_start(self):
|
||||
self.app = get_test_app(argv=['debug', '--start'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_php(self):
|
||||
self.app = get_test_app(argv=['debug', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_nginx(self):
|
||||
self.app = get_test_app(argv=['debug', '--nginx'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_rewrite(self):
|
||||
self.app = get_test_app(argv=['debug', '--rewrite'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_fpm(self):
|
||||
self.app = get_test_app(argv=['debug', '--fpm'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_mysql(self):
|
||||
self.app = get_test_app(argv=['debug', '--mysql'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_import_slow_log_interval(self):
|
||||
self.app = get_test_app(argv=['debug', '--mysql',
|
||||
'--import-slow-log-interval'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_site_name_mysql(self):
|
||||
self.app = get_test_app(argv=['debug', 'example3.com', '--mysql'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_site_name_wp(self):
|
||||
self.app = get_test_app(argv=['debug', 'example4.com', '--wp'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_site_name_nginx(self):
|
||||
self.app = get_test_app(argv=['debug', 'example4.com', '--nginx'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_site_name_start(self):
|
||||
self.app = get_test_app(argv=['debug', 'example1.com', '--start'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_site_name_stop(self):
|
||||
self.app = get_test_app(argv=['debug', 'example1.com', '--stop'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_debug_site_name_rewrite(self):
|
||||
self.app = get_test_app(argv=['debug', 'example1.com', '--rewrite'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,28 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseInfo(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_info_mysql(self):
|
||||
self.app = get_test_app(argv=['info', '--mysql'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_info_php(self):
|
||||
self.app = get_test_app(argv=['info', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_info_nginx(self):
|
||||
self.app = get_test_app(argv=['info', '--nginx'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,28 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseSecure(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_secure_auth(self):
|
||||
self.app = get_test_app(argv=['secure', '--auth', 'abc', 'superpass'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_secure_port(self):
|
||||
self.app = get_test_app(argv=['secure', '--port', '22222'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_secure_ip(self):
|
||||
self.app = get_test_app(argv=['secure', '--ip', '172.16.0.1'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,38 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseSite(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_detele(self):
|
||||
self.app = get_test_app(argv=['site', 'delete', 'example1.com',
|
||||
'--no-prompt'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_detele_all(self):
|
||||
self.app = get_test_app(argv=['site', 'delete', 'example2.com',
|
||||
'--all', '--no-prompt'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_detele_db(self):
|
||||
self.app = get_test_app(argv=['site', 'delete', 'example3.com',
|
||||
'--db', '--no-prompt'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_site_detele_files(self):
|
||||
self.app = get_test_app(argv=['site', 'delete', 'example4.com',
|
||||
'--files', '--no-prompt'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,73 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseStack(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_web(self):
|
||||
self.app = get_test_app(argv=['stack', 'purge',
|
||||
'--web', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_admin(self):
|
||||
self.app = get_test_app(argv=['stack', 'purge',
|
||||
'--admin', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_nginx(self):
|
||||
self.app = get_test_app(argv=['stack', 'purge',
|
||||
'--nginx', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_php(self):
|
||||
self.app = get_test_app(argv=['stack', 'purge',
|
||||
'--php', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_mysql(self):
|
||||
self.app = get_test_app(argv=['stack', 'purge',
|
||||
'--mysql', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_wpcli(self):
|
||||
self.app = get_test_app(argv=['stack', 'purge',
|
||||
'--wpcli', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_phpmyadmin(self):
|
||||
self.app = get_test_app(
|
||||
argv=['stack', 'purge', '--phpmyadmin', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_adminer(self):
|
||||
self.app = get_test_app(
|
||||
argv=['stack', 'purge', '--adminer', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_utils(self):
|
||||
self.app = get_test_app(argv=['stack', 'purge',
|
||||
'--utils', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
@@ -1,66 +0,0 @@
|
||||
from wo.utils import test
|
||||
from wo.cli.main import get_test_app
|
||||
|
||||
|
||||
class CliTestCaseStack(test.WOTestCase):
|
||||
|
||||
def test_wo_cli(self):
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_remove_web(self):
|
||||
self.app = get_test_app(argv=['stack', 'remove', '--web', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_install_admin(self):
|
||||
self.app = get_test_app(argv=['stack', 'remove', '--admin', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_install_nginx(self):
|
||||
self.app = get_test_app(argv=['stack', 'remove', '--nginx', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_install_php(self):
|
||||
self.app = get_test_app(argv=['stack', 'remove', '--php', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_install_mysql(self):
|
||||
self.app = get_test_app(argv=['stack', 'remove', '--mysql', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_install_wpcli(self):
|
||||
self.app = get_test_app(argv=['stack', 'remove', '--wpcli', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_install_phpmyadmin(self):
|
||||
self.app = get_test_app(argv=['stack', 'remove',
|
||||
'--phpmyadmin', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_install_adminer(self):
|
||||
self.app = get_test_app(
|
||||
argv=['stack', 'remove', '--adminer', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_install_utils(self):
|
||||
self.app = get_test_app(argv=['stack', 'remove', '--utils', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
Reference in New Issue
Block a user