def test_provider_add_with_bad_credentials(provider):
    """ Tests provider add with bad credentials

    Metadata:
        test_flag: crud
    """
    provider.credentials['default'] = get_credentials_from_config('bad_credentials')
    with error.expected('Login failed due to a bad username or password.'):
        provider.create(validate_credentials=True)
Example #2
0
def test_provider_add_with_bad_credentials(provider):
    """ Tests provider add with bad credentials

    Metadata:
        test_flag: crud
    """
    provider.credentials['default'] = get_credentials_from_config(
        'bad_credentials')
    with error.expected('Login failed due to a bad username or password.'):
        provider.create(validate_credentials=True)
def test_provider_add_with_bad_credentials(provider):
    """Tests provider add with bad credentials

    Metadata:
        test_flag: crud
    """
    provider.credentials['default'] = get_credentials_from_config('bad_credentials')
    if isinstance(provider, VMwareProvider):
        with error.expected('Cannot complete login due to an incorrect user name or password.'):
            provider.create(validate_credentials=True)
    elif isinstance(provider, RHEVMProvider):
        with error.expected('401 Unauthorized'):
            provider.create(validate_credentials=True)
Example #4
0
def test_provider_add_with_bad_credentials(provider):
    """Tests provider add with bad credentials

    Metadata:
        test_flag: crud
    """
    provider.credentials['default'] = get_credentials_from_config('bad_credentials')
    if isinstance(provider, VMwareProvider):
        with error.expected('Cannot complete login due to an incorrect user name or password.'):
            provider.create(validate_credentials=True)
    elif isinstance(provider, RHEVMProvider):
        error_message = version.pick(
            {'5.4': '401 Unauthorized',
             '5.5': 'Credential validation was not successful: '
                'Login failed due to a bad username or password.'}
        )
        with error.expected(error_message):
            provider.create(validate_credentials=True)
Example #5
0
def test_provider_add_with_bad_credentials(provider):
    """Tests provider add with bad credentials

    Metadata:
        test_flag: crud
    """
    provider.credentials['default'] = get_credentials_from_config(
        'bad_credentials')
    if isinstance(provider, VMwareProvider):
        with error.expected(
                'Cannot complete login due to an incorrect user name or password.'
        ):
            provider.create(validate_credentials=True)
    elif isinstance(provider, RHEVMProvider):
        error_message = version.pick({
            '5.4':
            '401 Unauthorized',
            '5.5':
            'Credential validation was not successful: '
            'Login failed due to a bad username or password.'
        })
        with error.expected(error_message):
            provider.create(validate_credentials=True)
Example #6
0
def test_providers_discovery_amazon():
    amazon_creds = get_credentials_from_config('cloudqe_amazon')
    discover(amazon_creds, d_type="Amazon")
    flash.assert_message_match(
        'Amazon Cloud Providers: Discovery successfully initiated')
    wait_for_a_provider()
def test_providers_discovery_amazon():
    amazon_creds = get_credentials_from_config('cloudqe_amazon')
    discover(amazon_creds, d_type="Amazon")
    flash.assert_message_match('Amazon Cloud Providers: Discovery successfully initiated')
    wait_for_a_provider()