def test_install_marathon(): """Install the Marathon package for DC/OS. """ # Install @retrying.retry(wait_fixed=1000, stop_max_attempt_number=30, retry_on_exception=common.ignore_exception) def install_marathon(): install_package_and_wait(PACKAGE_NAME) install_marathon() assert package_installed(PACKAGE_NAME), 'Package failed to install' # 5000ms = 5 seconds, 5 seconds * 60 attempts = 300 seconds = WAIT_TIME_IN_SECS @retrying.retry(wait_fixed=5000, stop_max_attempt_number=60, retry_on_exception=common.ignore_exception) def assert_service_registration(package, service): found = get_service(package) is not None assert found and service_healthy( service ), f"Service {package} did not register with DCOS" # NOQA E999 assert_service_registration(PACKAGE_NAME, SERVICE_NAME) common.deployment_wait(service_id=SERVICE_NAME) # Uninstall uninstall('marathon-user') common.deployment_wait(service_id=SERVICE_NAME) # Reinstall install_package_and_wait(PACKAGE_NAME) assert package_installed(PACKAGE_NAME), 'Package failed to reinstall'
def test_install_marathon(): """Install the Marathon package for DC/OS. """ # Install @retrying.retry(wait_fixed=1000, stop_max_attempt_number=30, retry_on_exception=common.ignore_exception) def install_marathon(): install_package_and_wait(PACKAGE_NAME) install_marathon() assert package_installed(PACKAGE_NAME), 'Package failed to install' # 5000ms = 5 seconds, 5 seconds * 60 attempts = 300 seconds = WAIT_TIME_IN_SECS @retrying.retry(wait_fixed=5000, stop_max_attempt_number=60, retry_on_exception=common.ignore_exception) def assert_service_registration(package, service): found = get_service(package) is not None assert found and service_healthy(service), f"Service {package} did not register with DCOS" # NOQA E999 assert_service_registration(PACKAGE_NAME, SERVICE_NAME) deployment_wait(service_id=SERVICE_NAME) # Uninstall uninstall('marathon-user') deployment_wait(service_id=SERVICE_NAME) # Reinstall install_package_and_wait(PACKAGE_NAME) assert package_installed(PACKAGE_NAME), 'Package failed to reinstall'
def test_install_universe_package(package): """ Marathon is responsible for installing packages from the universe. This test confirms that several packages are installed into a healty state. """ install_package_and_wait(package) assert package_installed(package), 'Package failed to install' common.deployment_wait(max_attempts=300) assert service_healthy(package)
def test_install_universe_package(package): """ Marathon is responsible for installing packages from the universe. This test confirms that several packages are installed into a healty state. """ install_package_and_wait(package) assert package_installed(package), 'Package failed to install' deployment_wait(max_attempts=300) assert service_healthy(package)
def is_mom_installed(): return package_installed('marathon')