예제 #1
0
def test_superadmin_tenant_crud(request):
    """Test suppose to verify CRUD operations for CFME tenants

    Prerequisities:
        * This test is not depending on any other test and can be executed against fresh appliance.

    Steps:
        * Create tenant
        * Update description of tenant
        * Update name of tenat
        * Delete tenant
    """
    tenant = Tenant(
        name='tenant1' + fauxfactory.gen_alphanumeric(),
        description='tenant1 description')

    @request.addfinalizer
    def _delete_tenant():
        if tenant.exists:
            tenant.delete()

    tenant.create()
    with update(tenant):
        tenant.description = tenant.description + "edited"
    with update(tenant):
        tenant.name = tenant.name + "edited"
    tenant.delete()
def test_superadmin_tenant_project_crud(request):
    """Test suppose to verify CRUD operations for CFME projects

    Prerequisities:
        * This test is not depending on any other test and can be executed against fresh appliance.

    Steps:
        * Create tenant
        * Create project as child to tenant
        * Update description of project
        * Update name of project
        * Delete project
        * Delete tenant
    """
    tenant = Tenant(name="tenant1" + fauxfactory.gen_alphanumeric(), description="tenant1 description")
    project = Project(
        name="project1" + fauxfactory.gen_alphanumeric(), description="project1 description", parent_tenant=tenant
    )

    @request.addfinalizer
    def _delete_tenant_and_project():
        for item in [project, tenant]:
            if item.exists:
                item.delete()

    tenant.create()
    project.create()
    with update(project):
        project.description = project.description + "edited"
    with update(project):
        project.name = project.name + "edited"
    project.delete()
    tenant.delete()
예제 #3
0
def test_superadmin_tenant_crud(request):
    """Test suppose to verify CRUD operations for CFME tenants

    Prerequisities:
        * This test is not depending on any other test and can be executed against fresh appliance.

    Steps:
        * Create tenant
        * Update description of tenant
        * Update name of tenat
        * Delete tenant
    """
    tenant = Tenant(
        name='tenant1' + fauxfactory.gen_alphanumeric(),
        description='tenant1 description')

    @request.addfinalizer
    def _delete_tenant():
        if tenant.exists:
            tenant.delete()

    tenant.create()
    with update(tenant):
        tenant.description = tenant.description + "edited"
    with update(tenant):
        tenant.name = tenant.name + "edited"
    tenant.delete()
예제 #4
0
def test_superadmin_tenant_project_crud(request):
    """Test suppose to verify CRUD operations for CFME projects

    Prerequisities:
        * This test is not depending on any other test and can be executed against fresh appliance.

    Steps:
        * Create tenant
        * Create project as child to tenant
        * Update description of project
        * Update name of project
        * Delete project
        * Delete tenant
    """
    tenant = Tenant(name='tenant1' + fauxfactory.gen_alphanumeric(),
                    description='tenant1 description')
    project = Project(name='project1' + fauxfactory.gen_alphanumeric(),
                      description='project1 description',
                      parent_tenant=tenant)

    @request.addfinalizer
    def _delete_tenant_and_project():
        for item in [project, tenant]:
            if item.exists:
                item.delete()

    tenant.create()
    project.create()
    with update(project):
        project.description = project.description + "edited"
    with update(project):
        project.name = project.name + "edited"
    project.delete()
    tenant.delete()