Beispiel #1
0
def test_name_required_error_validation():
    """
    Tests a System Image with no name.
    """
    sys_image_type = pxe.SystemImageType(name=None, provision_type='Vm')
    with error.expected('Name is required'):
        sys_image_type.create()
Beispiel #2
0
def test_duplicate_name_error_validation():
    """
    Tests a System Image for duplicate name.
    """
    sys_image_type = pxe.SystemImageType(name=fauxfactory.gen_alphanumeric(8),
                                         provision_type='Vm')
    sys_image_type.create()
    with error.expected('Name has already been taken'):
        sys_image_type.create()
    sys_image_type.delete(cancel=False)
Beispiel #3
0
def test_system_image_type_crud():
    """
    Tests a System Image Type using CRUD operations.
    """
    sys_image_type = pxe.SystemImageType(name=fauxfactory.gen_alphanumeric(8),
                                         provision_type='Vm')
    sys_image_type.create()
    with update(sys_image_type):
        sys_image_type.name = sys_image_type.name + "_update"
    sys_image_type.delete(cancel=False)
def test_duplicate_name_error_validation():
    """
    Tests a System Image for duplicate name.
    """
    sys_image_type = pxe.SystemImageType(
        name=generate_random_string(size=8),
        provision_type='Vm')
    sys_image_type.create()
    with error.expected('Name has already been taken'):
        sys_image_type.create()
    sys_image_type.delete(cancel=False)
def test_system_image_type_crud():
    """
    Tests a System Image Type using CRUD operations.
    """
    sys_image_type = pxe.SystemImageType(
        name=generate_random_string(size=8),
        provision_type='Vm')
    sys_image_type.create()
    with update(sys_image_type):
        sys_image_type.name = sys_image_type.name + "_update"
    sys_image_type.delete(cancel=False)