Пример #1
0
def _run_tests(cluster, admin_username, admin_password):
    cluster.wait_for_dcos_ee(
        superuser_username=admin_username,
        superuser_password=admin_password,
    )

    master_node = next(iter(cluster.masters))
    master_ip = master_node.public_ip_address.exploded

    with dcos_tempdir():
        print(master_ip)
        setup(master_ip,
              no_check=True,
              username=admin_username,
              password_str=admin_password)

        os.chdir("../python/lib/dcoscli")

        retcode = pytest.main([
            '-vv', '-x', '--durations=10', '-p', 'no:cacheprovider',
            'tests/integrations'
        ])

    if retcode != 0:
        print("Sleeping for 5 minutes to leave room for manual debugging...")
        print(master_ip)
        time.sleep(300)

    sys.exit(retcode)
def _run_tests(cluster, admin_username, admin_password):
    cluster.wait_for_dcos_ee(
        superuser_username=admin_username,
        superuser_password=admin_password,
    )

    master_node = next(iter(cluster.masters))
    master_ip = master_node.public_ip_address.exploded

    with dcos_tempdir():
        print(master_ip)
        exec_command([
            'dcos', 'cluster', 'setup', '--no-check', '--username',
            admin_username, '--password', admin_password, master_ip
        ])

        exec_command([
            'dcos', 'plugin', 'add', '-u',
            '../build/' + sys.platform + '/dcos-core-cli.zip'
        ])

        os.chdir("../python/lib/dcoscli")

        retcode = pytest.main([
            '-vv', '-x', '--durations=10', '-p', 'no:cacheprovider',
            'tests/integrations'
        ])

    if retcode != 0:
        print("Sleeping for 5 minutes to leave room for manual debugging...")
        print(master_ip)
        time.sleep(300)

    sys.exit(retcode)
Пример #3
0
def dcos_dir_tmp():
    with dcos_tempdir() as tempdir:
        yield tempdir
Пример #4
0
def dcos_dir_tmp_copy():
    with dcos_tempdir(True) as tempdir:
        yield tempdir
Пример #5
0
def temp_dcos_dir():
    with dcos_tempdir() as tempdir:
        yield tempdir
import time

import pytest

from dcoscli.test.common import dcos_tempdir, exec_command

os.environ["CLI_TEST_SSH_USER"] = "******"
os.environ["CLI_TEST_MASTER_PROXY"] = "1"
os.environ["CLI_TEST_SSH_KEY_PATH"] = os.environ.get('DCOS_TEST_SSH_KEY_PATH')

code, out, _ = exec_command(['./launch_aws_cluster.py'])
assert code == 0

master_ip = out.decode()

with dcos_tempdir():
    code, _, _ = exec_command(
        ['dcos', 'cluster', 'setup', '--no-check', master_ip])
    assert code == 0

    code, _, _ = exec_command([
        'dcos', 'plugin', 'add', '-u',
        '../build/' + sys.platform + '/dcos-core-cli.zip'
    ])
    assert code == 0

    os.chdir("../python/lib/dcoscli")

    retcode = pytest.main([
        '-vv', '-x', '--durations=10', '-p', 'no:cacheprovider',
        'tests/integrations'