Esempio n. 1
0
def openshift_test(request):
    try:
        basic_blueprint_test(request.param,
                             blueprint_id_filter(request.param),
                             inputs='namespace=blueprint-tests',
                             timeout=3000)
    except:
        cleanup_on_failure(blueprint_id_filter(request.param))
        raise
Esempio n. 2
0
def blueprint_examples(request):
    test_name = os.path.dirname(request.param).split('/')[-1:][0]
    try:
        basic_blueprint_test(
            request.param,
            test_name,
            inputs=json.dumps({})
        )
    except:
        cleanup_on_failure(test_name)
        raise
Esempio n. 3
0
def blueprint_examples(request):
    dirname_param = os.path.dirname(request.param).split('/')[-1:][0]
    try:
        basic_blueprint_test(
            request.param,
            dirname_param,
            inputs='resource_prefix=kube-{0}'.format(
                os.environ['CIRCLE_BUILD_NUM']))
    except:
        cleanup_on_failure(dirname_param)
        raise
Esempio n. 4
0
def blueprint_examples(request):
    test_name = os.path.dirname(request.param).split('/')[-1:][0]
    inputs = 'external_network_id=ext-net'
    try:
        basic_blueprint_test(
            request.param,
            test_name,
            inputs=inputs,
        )
    except:
        cleanup_on_failure(test_name)
        raise
Esempio n. 5
0
def blueprint_examples(request):
    dirname_param = os.path.dirname(request.param).split('/')[-1:][0]
    try:
        basic_blueprint_test(
            request.param,
            dirname_param,
            inputs='network_name=ansnet-{0} -i subnet_name=anssub-{0}'.format(
                os.environ['CIRCLE_BUILD_NUM']),
            timeout=3000)
    except:
        cleanup_on_failure(dirname_param)
        raise
def blueprint_examples(request):
    dirname_param = os.path.dirname(request.param).split('/')[-1:][0]
    try:
        if dirname_param == "azure-aks":
            inputs = 'resource_suffix=it'
        else:
            inputs = 'resource_prefix=azpl -i resource_suffix=test{0}'.format(
                os.environ['CIRCLE_BUILD_NUM'])
        basic_blueprint_test(request.param, dirname_param, inputs=inputs)
    except:
        cleanup_on_failure(dirname_param)
        raise
Esempio n. 7
0
def blueprint_examples(request):
    dirname_param = os.path.dirname(request.param).split('/')[-1:][0]
    try:
        if dirname_param == "gcp-gke":
            inputs = "resource_prefix=gcpresource-{0}"
        else:  # it`s virtual-machine example
            inputs = ''
        basic_blueprint_test(
            request.param, dirname_param,
            inputs=inputs.format(os.environ['CIRCLE_BUILD_NUM']), timeout=3000)
    except:
        cleanup_on_failure(dirname_param)
        raise
Esempio n. 8
0
def blueprint_examples(request):
    test_name = os.path.dirname(request.param).split('/')[-1:][0]
    try:
        basic_blueprint_test(
            request.param,
            test_name,
            inputs={
                'controller_uuid': '',
                'controller_name': ''
            },
        )
    except Exception:
        cleanup_on_failure(test_name)
        raise
Esempio n. 9
0
def basic_blueprint_test_with_getting_started_filter(request):
    _, infra_name = get_dirname_and_infra_name(request.param)
    blueprints_upload(request.param, 'infra-{0}'.format(infra_name))
    for blueprint_path in getting_started_list:
        blueprint_id = '{0}-{1}'.format(blueprint_id_filter(blueprint_path),
                                        infra_name)
        try:
            basic_blueprint_test(
                blueprint_path,
                blueprint_id,
                inputs='infra_name={0} -i infra_exists=true'.format(
                    infra_name),
                timeout=3000)
        except:
            cleanup_on_failure(blueprint_id)
            raise
Esempio n. 10
0
def blueprint_examples(request):
    test_name = os.path.dirname(request.param).split('/')[-1:][0]
    if os.environ['TEST_NAME'] not in test_name:
        return
    if 'eks' in test_name or 'virtual-machine' in test_name:
        inputs = 'aws_region_name=us-east-1 -i resource_suffix={0}'.format(
            os.environ.get('CIRCLE_BUILD_NUM', 'tst'))
    else:
        inputs = 'aws_region_name=us-east-1'
    try:
        basic_blueprint_test(request.param,
                             test_name,
                             inputs=inputs,
                             timeout=3000)
    except:
        cleanup_on_failure(test_name)
        raise
Esempio n. 11
0
def basic_blueprint_test_with_getting_started_filter(request):
    _, infra_name = get_dirname_and_infra_name(request.param)
    blueprints_upload(request.param, 'infra-{0}'.format(infra_name))
    for blueprint_path in getting_started_list:
        blueprint_id = '{0}-{1}'.format(blueprint_id_filter(blueprint_path),
                                        infra_name)
        timeout = 1800 if infra_name == 'azure' else 600
        try:
            basic_blueprint_test(blueprint_path,
                                 blueprint_id,
                                 inputs='infra_name={0} '
                                 '-i infra_exists=true '
                                 '-i env_name={1}'.format(
                                     infra_name,
                                     os.environ['CIRCLE_BUILD_NUM']),
                                 timeout=timeout,
                                 use_vpn='vsphere' in infra_name)
        except:
            cleanup_on_failure(blueprint_id)
            raise