Update Travis and tests
This commit is contained in:
13
.travis.yml
13
.travis.yml
@@ -51,14 +51,15 @@ script:
|
||||
- sudo cat /etc/nginx/nginx.conf
|
||||
- sudo tree -L 2 /etc/nginx
|
||||
- sudo cat /etc/mysql/my.cnf
|
||||
- sudo wo stack upgrade --nginx --no-prompt
|
||||
- sudo wo stack upgrade --php --no-prompt
|
||||
- sudo wo stack upgrade --netdata --no-prompt
|
||||
- sudo wo stack upgrade --phpmyadmin --no-prompt
|
||||
- sudo wo stack upgrade --composer --no-prompt
|
||||
- sudo wo stack upgrade --nginx --force
|
||||
- sudo wo stack upgrade --php --force
|
||||
- sudo wo stack upgrade --netdata --force
|
||||
- sudo wo stack upgrade --phpmyadmin --force
|
||||
- sudo wo stack upgrade --composer --force
|
||||
- sudo wo stack upgrade --dashboard --force
|
||||
- sudo wo update --travis
|
||||
- sudo wo stack status
|
||||
- sudo tar -I pigz -cf wordops.tar.gz /var/log/wo
|
||||
- curl --progress-bar --upload-file wordops.tar.gz https://transfer.vtbox.net/$(basename "wordops.tar.gz") && echo "" | sudo tee -a $HOME/.transfer.log && echo ""
|
||||
- echo "yes" | sudo wo stack purge --all
|
||||
- echo "yes" | sudo wo stack purge --all --force
|
||||
- sudo bash install --purge
|
||||
|
||||
@@ -10,19 +10,19 @@ class CliTestCaseSecure(test.WOTestCase):
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_secure_auth(self):
|
||||
self.app = get_test_app(argv=['secure', '--auth'])
|
||||
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'])
|
||||
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'])
|
||||
self.app = get_test_app(argv=['secure', '--ip', '172.16.0.1'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
@@ -10,55 +10,64 @@ class CliTestCaseStack(test.WOTestCase):
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_purge_web(self):
|
||||
self.app = get_test_app(argv=['stack', 'purge', '--web'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
self.app = get_test_app(argv=['stack', 'purge',
|
||||
'--utils', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
@@ -10,55 +10,57 @@ class CliTestCaseStack(test.WOTestCase):
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_remove_web(self):
|
||||
self.app = get_test_app(argv=['stack', 'remove', '--web'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
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'])
|
||||
self.app = get_test_app(argv=['stack', 'remove', '--utils', '--force'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
@@ -762,14 +762,15 @@ class WOStackController(CementBaseController):
|
||||
.format(WOVariables.wo_webroot)]
|
||||
|
||||
if (packages) or (apt_packages):
|
||||
wo_prompt = input('Are you sure you to want to purge '
|
||||
'from server '
|
||||
'along with their configuration'
|
||||
' packages,\nAny answer other than '
|
||||
'"yes" will be stop this '
|
||||
'operation :')
|
||||
if not pargs.force:
|
||||
wo_prompt = input('Are you sure you to want to purge '
|
||||
'from server '
|
||||
'along with their configuration'
|
||||
' packages,\nAny answer other than '
|
||||
'"yes" will be stop this '
|
||||
'operation :')
|
||||
|
||||
if wo_prompt == 'YES' or wo_prompt == 'yes' or pargs.force:
|
||||
if (wo_prompt == 'YES' or wo_prompt == 'yes' or pargs.force):
|
||||
|
||||
if (set(["nginx-custom"]).issubset(set(apt_packages))):
|
||||
WOService.stop_service(self, 'nginx')
|
||||
|
||||
@@ -91,7 +91,7 @@ class WOStackMigrateController(CementBaseController):
|
||||
if ((not self.app.pargs.mariadb)):
|
||||
self.app.args.print_help()
|
||||
if self.app.pargs.mariadb:
|
||||
if WOVariables.wo_mysql_host is not "localhost":
|
||||
if WOVariables.wo_mysql_host != "localhost":
|
||||
Log.error(
|
||||
self, "Remote MySQL server in use, skipping local install")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user