Browse Source

added test cases for ee stack start/stop/remove/purge/status/restart

bugfixes
shital.rtcamp 10 years ago
parent
commit
6601c88cf7
  1. 76
      tests/cli/test_stack_purge.py
  2. 76
      tests/cli/test_stack_remove.py
  3. 52
      tests/cli/test_stack_services_restart.py
  4. 52
      tests/cli/test_stack_services_start.py
  5. 52
      tests/cli/test_stack_services_status.py
  6. 52
      tests/cli/test_stack_services_stop.py

76
tests/cli/test_stack_purge.py

@ -0,0 +1,76 @@
from ee.utils import test
from ee.cli.main import get_test_app
class CliTestCaseStack(test.EETestCase):
def test_ee_cli(self):
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_web(self):
self.app = get_test_app(argv=['stack', 'purge', '--web'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_admin(self):
self.app = get_test_app(argv=['stack', 'purge', '--admin'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_mail(self):
self.app = get_test_app(argv=['stack', 'purge', '--mail'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_nginx(self):
self.app = get_test_app(argv=['stack', 'purge', '--nginx'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_php(self):
self.app = get_test_app(argv=['stack', 'purge', '--php'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_mysql(self):
self.app = get_test_app(argv=['stack', 'purge', '--mysql'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_postfix(self):
self.app = get_test_app(argv=['stack', 'purge', '--postfix'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_wpcli(self):
self.app = get_test_app(argv=['stack', 'purge', '--wpcli'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_phpmyadmin(self):
self.app = get_test_app(argv=['stack', 'purge', '--phpmyadmin'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_adminer(self):
self.app = get_test_app(argv=['stack', 'purge', '--adminer'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_purge_utils(self):
self.app = get_test_app(argv=['stack', 'purge', '--utils'])
self.app.setup()
self.app.run()
self.app.close()

76
tests/cli/test_stack_remove.py

@ -0,0 +1,76 @@
from ee.utils import test
from ee.cli.main import get_test_app
class CliTestCaseStack(test.EETestCase):
def test_ee_cli(self):
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_remove_web(self):
self.app = get_test_app(argv=['stack', 'remove', '--web'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_admin(self):
self.app = get_test_app(argv=['stack', 'remove', '--admin'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_mail(self):
self.app = get_test_app(argv=['stack', 'remove', '--mail'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_nginx(self):
self.app = get_test_app(argv=['stack', 'remove', '--nginx'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_php(self):
self.app = get_test_app(argv=['stack', 'remove', '--php'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_mysql(self):
self.app = get_test_app(argv=['stack', 'remove', '--mysql'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_postfix(self):
self.app = get_test_app(argv=['stack', 'remove', '--postfix'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_wpcli(self):
self.app = get_test_app(argv=['stack', 'remove', '--wpcli'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_phpmyadmin(self):
self.app = get_test_app(argv=['stack', 'remove', '--phpmyadmin'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_adminer(self):
self.app = get_test_app(argv=['stack', 'remove', '--adminer'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_install_utils(self):
self.app = get_test_app(argv=['stack', 'remove', '--utils'])
self.app.setup()
self.app.run()
self.app.close()

52
tests/cli/test_stack_services_restart.py

@ -0,0 +1,52 @@
from ee.utils import test
from ee.cli.main import get_test_app
class CliTestCaseStack(test.EETestCase):
def test_ee_cli(self):
self.app.setup()
self.app.run()
self.app.close()
def test_ee_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_ee_cli_stack_services_restart_php5_fpm(self):
self.app = get_test_app(argv=['stack', 'restart', '--php5-fpm'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_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_ee_cli_stack_services_restart_postfix(self):
self.app = get_test_app(argv=['stack', 'restart', '--postfix'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_restart_memcached(self):
self.app = get_test_app(argv=['stack', 'restart', '--memcached'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_restart_dovecot(self):
self.app = get_test_app(argv=['stack', 'restart', '--dovecot'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_restart_all(self):
self.app = get_test_app(argv=['stack', 'restart'])
self.app.setup()
self.app.run()
self.app.close()

52
tests/cli/test_stack_services_start.py

@ -0,0 +1,52 @@
from ee.utils import test
from ee.cli.main import get_test_app
class CliTestCaseStack(test.EETestCase):
def test_ee_cli(self):
self.app.setup()
self.app.run()
self.app.close()
def test_ee_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_ee_cli_stack_services_start_php5_fpm(self):
self.app = get_test_app(argv=['stack', 'start', '--php5-fpm'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_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_ee_cli_stack_services_start_postfix(self):
self.app = get_test_app(argv=['stack', 'start', '--postfix'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_start_memcached(self):
self.app = get_test_app(argv=['stack', 'start', '--memcached'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_start_dovecot(self):
self.app = get_test_app(argv=['stack', 'start', '--dovecot'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_start_all(self):
self.app = get_test_app(argv=['stack', 'start'])
self.app.setup()
self.app.run()
self.app.close()

52
tests/cli/test_stack_services_status.py

@ -0,0 +1,52 @@
from ee.utils import test
from ee.cli.main import get_test_app
class CliTestCaseStack(test.EETestCase):
def test_ee_cli(self):
self.app.setup()
self.app.run()
self.app.close()
def test_ee_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_ee_cli_stack_services_status_php5_fpm(self):
self.app = get_test_app(argv=['stack', 'status', '--php5-fpm'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_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_ee_cli_stack_services_status_postfix(self):
self.app = get_test_app(argv=['stack', 'status', '--postfix'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_status_memcached(self):
self.app = get_test_app(argv=['stack', 'status', '--memcached'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_status_dovecot(self):
self.app = get_test_app(argv=['stack', 'status', '--dovecot'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_status_all(self):
self.app = get_test_app(argv=['stack', 'status'])
self.app.setup()
self.app.run()
self.app.close()

52
tests/cli/test_stack_services_stop.py

@ -0,0 +1,52 @@
from ee.utils import test
from ee.cli.main import get_test_app
class CliTestCaseStack(test.EETestCase):
def test_ee_cli(self):
self.app.setup()
self.app.run()
self.app.close()
def test_ee_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_ee_cli_stack_services_stop_php5_fpm(self):
self.app = get_test_app(argv=['stack', 'stop', '--php5-fpm'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_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_ee_cli_stack_services_stop_postfix(self):
self.app = get_test_app(argv=['stack', 'stop', '--postfix'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_stop_memcached(self):
self.app = get_test_app(argv=['stack', 'stop', '--memcached'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_stop_dovecot(self):
self.app = get_test_app(argv=['stack', 'stop', '--dovecot'])
self.app.setup()
self.app.run()
self.app.close()
def test_ee_cli_stack_services_stop_all(self):
self.app = get_test_app(argv=['stack', 'stop'])
self.app.setup()
self.app.run()
self.app.close()
Loading…
Cancel
Save