Beispiel #1
0
def test_password_max_character_validation():
    password = fauxfactory.gen_alphanumeric(51)
    cred = Credential(
        principal=fauxfactory.gen_alphanumeric(5),
        secret=password,
        verify_secret=password)
    discover(cred, d_type="Amazon")
Beispiel #2
0
def test_password_max_character_validation():
    password = generate_random_string(size=51)
    cred = Credential(
        principal=generate_random_string(size=5),
        secret=password,
        verify_secret=password)
    provider.discover(cred)
Beispiel #3
0
def test_discovery_cancelled_validation():
    """ Tests that the flash message is correct when discovery is cancelled."""
    discover(None, cancel=True, d_type="Amazon")
    msg = version.pick(
        {version.LOWEST: 'Amazon Cloud Providers Discovery was cancelled by the user',
         '5.5': 'Cloud Providers Discovery was cancelled by the user'})
    flash.assert_message_match(msg)
Beispiel #4
0
def test_password_mismatch_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(5),
                      secret=fauxfactory.gen_alphanumeric(5),
                      verify_secret=fauxfactory.gen_alphanumeric(7))

    discover(cred, d_type="Amazon")
    flash.assert_message_match('Password/Verify Password do not match')
def test_providers_discovery(request, provider):
    """Tests provider discovery

    Metadata:
        test_flag: crud
    """
    if provider.one_of(AzureProvider):
        cred = Credential(
            principal=provider.default_endpoint.credentials.principal,
            secret=provider.default_endpoint.credentials.secret,
            tenant_id=provider.data['tenant_id'],
            subscription_id=provider.data['subscription_id'])
    elif provider.one_of(EC2Provider):
        cred = Credential(
            principal=provider.default_endpoint.credentials.principal,
            secret=provider.default_endpoint.credentials.secret,
            verify_secret=provider.default_endpoint.credentials.secret)

    discover(cred, provider)
    view = provider.create_view(CloudProvidersView)
    view.flash.assert_success_message(
        'Cloud Providers: Discovery successfully initiated')

    request.addfinalizer(CloudProvider.clear_providers)
    wait_for_a_provider()
def test_password_max_character_validation():
    password = fauxfactory.gen_alphanumeric(51)
    cred = Credential(
        principal=fauxfactory.gen_alphanumeric(5),
        secret=password,
        verify_secret=password)
    discover(cred, d_type="Amazon")
def test_discovery_cancelled_validation():
    """ Tests that the flash message is correct when discovery is cancelled."""
    discover(None, cancel=True, d_type="Amazon")
    msg = version.pick(
        {version.LOWEST: 'Amazon Cloud Providers Discovery was cancelled by the user',
         '5.5': 'Cloud Providers Discovery was cancelled by the user'})
    flash.assert_message_match(msg)
Beispiel #8
0
def test_password_mismatch_validation():
    cred = Credential(
        principal=generate_random_string(size=5),
        secret=generate_random_string(size=5),
        verify_secret=generate_random_string(size=7))

    provider.discover(cred)
    flash.assert_message_match('Password/Verify Password do not match')
Beispiel #9
0
def test_password_mismatch_validation(appliance):
    cred = Credential(principal=fauxfactory.gen_alphanumeric(5),
                      secret=fauxfactory.gen_alphanumeric(5),
                      verify_secret=fauxfactory.gen_alphanumeric(7))

    discover(cred, EC2Provider)
    view = appliance.browser.create_view(CloudProvidersView)
    view.flash.assert_message('Password/Verify Password do not match')
Beispiel #10
0
def test_providers_discovery_amazon():
    raise pytest.skip(
        'discovery and teardown is not parallel; this routinely times out')
    amazon_creds = provider.get_credentials_from_config('cloudqe_amazon')
    provider.discover(amazon_creds)
    flash.assert_message_match(
        'Amazon Cloud Providers: Discovery successfully initiated')
    provider.wait_for_a_provider()
def test_password_mismatch_validation():
    cred = Credential(
        principal=fauxfactory.gen_alphanumeric(5),
        secret=fauxfactory.gen_alphanumeric(5),
        verify_secret=fauxfactory.gen_alphanumeric(7))

    discover(cred, d_type="Amazon")
    flash.assert_message_match('Password/Verify Password do not match')
def test_password_mismatch_validation(appliance):
    cred = Credential(
        principal=fauxfactory.gen_alphanumeric(5),
        secret=fauxfactory.gen_alphanumeric(5),
        verify_secret=fauxfactory.gen_alphanumeric(7))

    discover(cred, EC2Provider)
    view = appliance.browser.create_view(CloudProvidersView)
    view.flash.assert_message('Password/Verify Password do not match')
Beispiel #13
0
def test_providers_discovery(request, provider):
    """Tests provider discovery

    Metadata:
        test_flag: crud
    """
    if provider.one_of(AzureProvider):
        cred = Credential(
            principal=provider.default_endpoint.credentials.principal,
            secret=provider.default_endpoint.credentials.secret,
            tenant_id=provider.data['tenant_id'],
            subscription_id=provider.data['subscription_id'])
    elif provider.one_of(EC2Provider):
        cred = Credential(
            principal=provider.default_endpoint.credentials.principal,
            secret=provider.default_endpoint.credentials.secret,
            verify_secret=provider.default_endpoint.credentials.secret)

    discover(cred, provider)
    view = provider.create_view(CloudProvidersView)
    view.flash.assert_success_message('Cloud Providers: Discovery successfully initiated')

    request.addfinalizer(CloudProvider.clear_providers)
    wait_for_a_provider()
Beispiel #14
0
def test_discovery_cancelled_validation(appliance):
    """ Tests that the flash message is correct when discovery is cancelled."""
    discover(None, EC2Provider, cancel=True)
    view = appliance.browser.create_view(CloudProvidersView)
    view.flash.assert_success_message(
        'Cloud Providers Discovery was cancelled by the user')
Beispiel #15
0
def test_that_checks_flash_with_empty_discovery_form():
    """ Tests that the flash message is correct when discovery form is empty."""
    provider.discover(None)
    flash.assert_message_match('User ID is required')
Beispiel #16
0
def test_empty_discovery_form_validation(appliance):
    """ Tests that the flash message is correct when discovery form is empty."""
    discover(None, EC2Provider)
    view = appliance.browser.create_view(CloudProvidersDiscoverView)
    view.flash.assert_message('Username is required')
def test_discovery_cancelled_validation():
    """ Tests that the flash message is correct when discovery is cancelled."""
    discover(None, cancel=True)
    flash.assert_message_match("Amazon Cloud Providers Discovery was cancelled by the user")
def test_empty_discovery_form_validation():
    """ Tests that the flash message is correct when discovery form is empty."""
    discover(None)
    ident = version.pick({version.LOWEST: "User ID", "5.4": "Username"})
    flash.assert_message_match("{} is required".format(ident))
Beispiel #19
0
def test_empty_discovery_form_validation():
    """ Tests that the flash message is correct when discovery form is empty."""
    discover(None, d_type="Amazon")
    ident = version.pick({version.LOWEST: 'User ID', '5.4': 'Username'})
    flash.assert_message_match('{} is required'.format(ident))
Beispiel #20
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_discovery_cancelled_validation(appliance):
    """ Tests that the flash message is correct when discovery is cancelled."""
    discover(None, EC2Provider, cancel=True)
    view = appliance.browser.create_view(CloudProvidersView)
    view.flash.assert_success_message('Cloud Providers Discovery was cancelled by the user')
def test_empty_discovery_form_validation_cloud(appliance):
    """ Tests that the flash message is correct when discovery form is empty."""
    discover(None, AzureProvider)
    view = appliance.browser.create_view(CloudProvidersDiscoverView)
    view.flash.assert_message('Client ID, Client Key, Azure Tenant ID and '
                              'Subscription ID are required')
Beispiel #23
0
def test_providers_discovery():
    amazon_creds = provider.get_credentials_from_config('cloudqe_amazon')
    provider.discover(amazon_creds)
    flash.assert_message_match('Amazon Cloud Providers: Discovery successfully initiated')
    provider.wait_for_a_provider()
Beispiel #24
0
def test_empty_discovery_form_validation_cloud(appliance):
    """ Tests that the flash message is correct when discovery form is empty."""
    discover(None, AzureProvider)
    view = appliance.browser.create_view(CloudProvidersDiscoverView)
    view.flash.assert_message('Client ID, Client Key, Azure Tenant ID and '
                              'Subscription ID are required')
Beispiel #25
0
def test_empty_discovery_form_validation():
    """ Tests that the flash message is correct when discovery form is empty."""
    provider.discover(None)
    flash.assert_message_match('User ID is required')
Beispiel #26
0
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51))
    provider.discover(cred)
Beispiel #27
0
def test_user_id_max_character_validation():
    cred = Credential(principal=generate_random_string(size=51))
    provider.discover(cred)
def test_empty_discovery_form_validation(appliance):
    """ Tests that the flash message is correct when discovery form is empty."""
    discover(None, EC2Provider)
    view = appliance.browser.create_view(CloudProvidersDiscoverView)
    view.flash.assert_message('Username is required')
Beispiel #29
0
def test_that_checks_flash_with_empty_discovery_form():
    """ Tests that the flash message is correct when discovery form is empty."""
    provider.discover(None)
    flash.assert_message_match('User ID is required')
Beispiel #30
0
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51))
    discover(cred, d_type="Amazon")
Beispiel #31
0
def test_that_checks_flash_when_discovery_cancelled():
    """ Tests that the flash message is correct when discovery is cancelled."""
    provider.discover(None, cancel=True)
    flash.assert_message_match('Amazon Cloud Providers Discovery was cancelled by the user')
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51), secret='')
    discover(cred, EC2Provider)
Beispiel #33
0
def test_providers_discovery_amazon():
    raise pytest.skip('discovery and teardown is not parallel; this routinely times out')
    amazon_creds = provider.get_credentials_from_config('cloudqe_amazon')
    provider.discover(amazon_creds)
    flash.assert_message_match('Amazon Cloud Providers: Discovery successfully initiated')
    provider.wait_for_a_provider()
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51))
    discover(cred, d_type="Amazon")
Beispiel #35
0
def test_discovery_cancelled_validation():
    """ Tests that the flash message is correct when discovery is cancelled."""
    discover(None, cancel=True)
    flash.assert_message_match(
        'Amazon Cloud Providers Discovery was cancelled by the user')
def test_empty_discovery_form_validation():
    """ Tests that the flash message is correct when discovery form is empty."""
    discover(None, d_type="Amazon")
    ident = version.pick({version.LOWEST: 'User ID',
                          '5.4': 'Username'})
    flash.assert_message_match('{} is required'.format(ident))
Beispiel #37
0
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51), secret='')
    discover(cred, EC2Provider)
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()
Beispiel #39
0
def test_that_checks_flash_when_discovery_cancelled():
    """ Tests that the flash message is correct when discovery is cancelled."""
    provider.discover(None, cancel=True)
    flash.assert_message_match(
        'Amazon Cloud Providers Discovery was cancelled by the user')