def clear_marathon(): try: common.stop_all_deployments() common.clear_pods() common.delete_all_apps_wait() except Exception as e: print(e)
def clear_marathon(): try: common.stop_all_deployments() common.clear_pods() common.delete_all_apps_wait() except Exception as e: print(e)
def teardown_module(module): # Remove everything from MoM with marathon_on_marathon(): delete_all_apps_wait() # Uninstall MoM shakedown.uninstall_package_and_wait('marathon') # Remove everything from root marathon delete_all_apps_wait()
def test_framework_unavailable_on_mom(): """Launches an app that has elements necessary to create a service endpoint in DCOS. This test confirms that the endpoint is not created when launched with MoM. """ app_def = apps.fake_framework() with shakedown.marathon_on_marathon(): common.delete_all_apps_wait() client = marathon.create_client() client.add_app(app_def) shakedown.deployment_wait() try: common.wait_for_service_endpoint('pyfw', 15) except Exception: pass else: assert False, 'MoM shoud NOT create a service endpoint'
def test_framework_unavailable_on_mom(): """Launches an app that has elements necessary to create a service endpoint in DCOS. This test confirms that the endpoint is not created when launched with MoM. """ app_def = apps.fake_framework() with shakedown.marathon_on_marathon(): common.delete_all_apps_wait() client = marathon.create_client() client.add_app(app_def) shakedown.deployment_wait() try: shakedown.wait_for_service_endpoint('pyfw', 15) except: pass else: assert False, 'MoM shoud NOT create a service endpoint'
def test_framework_unavailable_on_mom(): """ Launches an app that has elements necessary to create a service endpoint in DCOS. This test confirms that the endpoint is not created when launched with MoM. """ if shakedown.service_available_predicate('pyfw'): client = marathon.create_client() client.remove_app('python-http', True) shakedown.deployment_wait() shakedown.wait_for_service_endpoint_removal('pyfw') with marathon_on_marathon(): delete_all_apps_wait() client = marathon.create_client() client.add_app(fake_framework_app()) shakedown.deployment_wait() try: shakedown.wait_for_service_endpoint('pyfw', 15) assert False, 'MoM shoud NOT create a service endpoint' except: assert True pass
def clear_marathon(): common.stop_all_deployments() common.delete_all_apps_wait()
def teardown_module(module): common.stop_all_deployments() common.delete_all_apps_wait()
def setup_function(function): common.stop_all_deployments() common.delete_all_apps_wait()
def setup_function(function): shakedown.wait_for_service_endpoint('marathon-user') with marathon_on_marathon(): delete_all_apps_wait()
def teardown_module(module): with marathon_on_marathon(): delete_all_apps_wait()