Пример #1
0
def test_dcos_diagnostics_bundle_create_download_delete(
        dcos_api_session: DcosApiSession, use_legacy_api: bool) -> None:
    """
    test bundle create, read, delete workflow
    """

    health_url = dcos_api_session.default_url.copy(
        query='cache=0',
        path='system/health/v1',
    )

    diagnostics = Diagnostics(
        default_url=health_url,
        masters=dcos_api_session.masters,
        all_slaves=dcos_api_session.all_slaves,
        session=dcos_api_session.copy().session,
        use_legacy_api=use_legacy_api,
    )

    app, test_uuid = test_helpers.marathon_test_docker_app('diag-bundle',
                                                           constraints=[])
    with dcos_api_session.marathon.deploy_and_cleanup(app, timeout=120):
        bundle = _create_bundle(diagnostics)
        _check_diagnostics_bundle_status(dcos_api_session)
        _download_and_extract_bundle(dcos_api_session, bundle, diagnostics)
        _download_and_extract_bundle_from_another_master(
            dcos_api_session, bundle, diagnostics)
        _delete_bundle(diagnostics, bundle)
Пример #2
0
def test_if_docker_app_can_be_deployed_windows(dcos_api_session):
    """Marathon app inside docker deployment integration test.

    Verifies that a marathon app inside of a docker daemon container can be
    deployed and accessed as expected on Windows.
    """
    deploy_test_app_and_check_windows(
        dcos_api_session,
        *test_helpers.marathon_test_docker_app(
            "simple-win", constraints=[['os', 'LIKE', 'windows']]))