def set_up(pg_version, es_version):
    """ Start containers """

    compose = docker_compose(pg_version, es_version)

    show_status(
        "Starting testing environment for PostgreSQL {pg_version} with Elasticsearch {es_version}..."
        .format(pg_version=pg_version, es_version=es_version))

    show_status("Stopping and Removing any old containers...")
    compose("stop")
    compose("rm", "--force")

    show_status("Building new images...")
    try:
        compose("build")
    except ErrorReturnCode as exc:
        print("Failed to build images...")
        print(exc.stdout.decode("utf-8"))
        print()
        print(exc.stderr.decode("utf-8"))
        sys.exit(1)

    show_status("Starting new containers...")
    compose("up", "-d")

    show_status("Testing environment started")
Exemple #2
0
def tear_down(version):
    dc = docker_compose(version)

    show_status(
        'Stopping testing environment for PostgreSQL {version}...'.format(
            version=version))

    dc('down')

    show_status('Testing environment stopped')
Exemple #3
0
def tear_down(pg_version, es_version):
    """ Stop containers """

    compose = docker_compose(pg_version, es_version)

    show_status(
        "Stopping testing environment for PostgreSQL {pg_version} with Elasticsearch {es_version}..."
        .format(pg_version=pg_version, es_version=es_version))

    compose("down")

    show_status("Testing environment stopped")
def tear_down(version):
    """ Stop containers """

    compose = docker_compose(version)

    show_status(
        'Stopping testing environment for PostgreSQL {version}...'.format(
            version=version))

    compose('down')

    show_status('Testing environment stopped')
Exemple #5
0
def set_up(version):
    dc = docker_compose(version)

    show_status(
        'Starting testing environment for PostgreSQL {version}...'.format(
            version=version))

    show_status('Stopping and Removing any old containers...')
    dc('stop')
    dc('rm', '--force')

    show_status('Building new images...')
    dc('build')

    show_status('Starting new containers...')
    dc('up', '-d')

    show_status('Testing environment started')
Exemple #6
0
def set_up(pg_version, es_version):
    """ Start containers """

    compose = docker_compose(pg_version, es_version)

    show_status(
        "Starting testing environment for PostgreSQL {pg_version} with Elasticsearch {es_version}..."
        .format(pg_version=pg_version, es_version=es_version))

    show_status("Stopping and Removing any old containers...")
    compose("stop")
    compose("rm", "--force")

    show_status("Building new images...")
    compose("build")

    show_status("Starting new containers...")
    compose("up", "-d")

    show_status("Testing environment started")