Ejemplo n.º 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")
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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')
Ejemplo n.º 5
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()
Ejemplo n.º 6
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")
Ejemplo n.º 7
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)
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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()
Ejemplo n.º 11
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')
Ejemplo n.º 12
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')
Ejemplo n.º 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()
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 17
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")
Ejemplo n.º 18
0
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))
Ejemplo n.º 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))
Ejemplo n.º 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()
Ejemplo n.º 21
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')
Ejemplo n.º 22
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')
Ejemplo n.º 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()
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 26
0
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51))
    provider.discover(cred)
Ejemplo n.º 27
0
def test_user_id_max_character_validation():
    cred = Credential(principal=generate_random_string(size=51))
    provider.discover(cred)
Ejemplo n.º 28
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')
Ejemplo n.º 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')
Ejemplo n.º 30
0
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51))
    discover(cred, d_type="Amazon")
Ejemplo n.º 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')
Ejemplo n.º 32
0
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51), secret='')
    discover(cred, EC2Provider)
Ejemplo n.º 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()
Ejemplo n.º 34
0
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51))
    discover(cred, d_type="Amazon")
Ejemplo n.º 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')
Ejemplo n.º 36
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))
Ejemplo n.º 37
0
def test_user_id_max_character_validation():
    cred = Credential(principal=fauxfactory.gen_alphanumeric(51), secret='')
    discover(cred, EC2Provider)
Ejemplo n.º 38
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()
Ejemplo n.º 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')