コード例 #1
0
    def test_create_provider_account(self, mozwebqa):
        '''
        Create provider account and test provider account connection
        '''
        home_page = Home(mozwebqa)
        assert home_page.login() == "Login successful!"

        page = Aeolus(mozwebqa)

        # create provider account
        for account in Provider.accounts:
            if account["type"] == "ec2":
                account = page.update_ec2_acct_credentials_from_config(account)
            assert page.create_provider_account(account) == \
                   "Account %s was added." % account["provider_account_name"]

        # test provider account
        for account in Provider.accounts:
            assert page.connection_test_provider_account(account) == \
                   "Test Connection Success: Valid Account Details"

        # test cleanup
        if page.test_cleanup == True:
            for account in Provider.accounts:
                assert page.delete_provider_account(account) == \
                       "Provider account was deleted!"

        assert page.logout() == "Aeolus Conductor | Login"
コード例 #2
0
ファイル: test_nav.py プロジェクト: aweiteka/CloudForms.Auto
    def test_login_and_nav(self, mozwebqa):
        '''
        Login and nav to random pages
        '''
        home_page = Home(mozwebqa)
        home_page.login()

        page = Aeolus(mozwebqa)
        workflow = ['users', 'providers', 'permissions', 'pool_families', 'logout']
        for view in workflow:
            page.go_to_page_view(view)
        time.sleep(1)
コード例 #3
0
    def test_add_users_to_user_groups(self, mozwebqa):
        home_page = Home(mozwebqa)
        assert home_page.login() == "Login successful!"

        page = Aeolus(mozwebqa)

        # move to aeolus_page.py
        # capture user IDs from "/users/" view
        for user in Admin.users:
            user["id"] = page.get_user_id(user["username"])

        # capture user_group IDs from "/user_groups/" view
        for user_group in Admin.user_groups:
            user_group["id"] = page.get_user_group_id(user_group["name"])
コード例 #4
0
    def test_provider_connection(self, mozwebqa):
        '''
        test provider connection
        '''
        home_page = Home(mozwebqa)
        assert home_page.login() == "Login successful!"

        page = Aeolus(mozwebqa)

        for account in Provider.accounts:
            assert page.connection_test_provider(account) == \
                   "Successfully Connected to Provider"

        assert page.logout() == "Aeolus Conductor | Login"
コード例 #5
0
    def test_new_pool(self, mozwebqa):
        '''
        create new pools
        '''
        home_page = Home(mozwebqa)
        assert home_page.login() == "Login successful!"

        page = Aeolus(mozwebqa)

        for pool in Environment.pools:
            assert page.new_pool(pool) == "Pool added."

       # test cleanup
        if page.test_cleanup == True:
            for pool in Environment.pools:
                assert page.delete_pool(pool) == \
                       "Pool %s was deleted." % pool["name"]
コード例 #6
0
    def test_new_catalog(self, mozwebqa):
        '''
        create new catalogs
        '''
        home_page = Home(mozwebqa)
        assert home_page.login() == "Login successful!"

        page = Aeolus(mozwebqa)

        for catalog in Environment.catalogs:
            assert page.new_catalog(catalog) == "Catalog created!"

        # test cleanup
        if page.test_cleanup == True:
            for catalog in Environment.catalogs:
                assert page.delete_catalog(catalog) == "Catalog deleted!"

        assert page.logout() == "Aeolus Conductor | Login"
コード例 #7
0
    def test_new_environment_pool_family(self, mozwebqa):
        '''
        create new environments or pool families
        '''
        home_page = Home(mozwebqa)
        assert home_page.login() == "Login successful!"

        page = Aeolus(mozwebqa)

        for environment in Environment.pool_family_environments:
            assert page.new_environment(environment) == "Pool family was added."

        # test cleanup
        if page.test_cleanup == True:
            for environment in Environment.pool_family_environments:
                assert page.delete_environment(environment) == \
                       "Pool Family was deleted!"
        assert page.logout() == "Aeolus Conductor | Login"
コード例 #8
0
    def test_create_user_groups(self, mozwebqa):
        '''
        create user groups
        '''
        home_page = Home(mozwebqa)
        #assert home_page.login() == "Login successful!"
        home_page.login()

        page = Aeolus(mozwebqa)

        for user_group in Admin.user_groups:
            assert page.create_user_group(user_group) == "User Group added"

        # test cleanup
        if page.test_cleanup == True:
            for user_group in Admin.user_groups:
                assert page.delete_user_group(user_group["name"]) == \
                       "Deleted user group " + user_group["name"]

        assert page.logout() == "Aeolus Conductor | Login"
コード例 #9
0
    def test_create_users(self, mozwebqa):
        '''
        Create users
        '''
        home_page = Home(mozwebqa)

        assert home_page.login() == aeolus_msg['login']

        page = Aeolus(mozwebqa)

        for user in Admin.users:
            assert page.create_user(user) == "User registered!"

        # test cleanup
        if page.test_cleanup == True:
            for user in Admin.users:
                assert page.delete_user(user["username"]) == \
                       "User has been successfully deleted."

        if page.product_ver == '1.0.1':
            page.logout()
        else:
            assert page.logout() == "Aeolus Conductor | Login"
        time.sleep(3)