Ejemplo n.º 1
0
    def test_negative_create_os_8(self):
        """@Test: OS - Create a new OS with same name and version

        @Feature: Create a new OS - Negative

        @Assert: OS is not created

        @BZ: 1120985

        """
        name = gen_string("alpha", 6)
        major_version = gen_string('numeric', 1)
        minor_version = gen_string('numeric', 1)
        os_family = "Red Hat"
        arch = "x86_64"
        with Session(self.browser) as session:
            make_os(session, name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family=os_family, archs=[arch])
            self.assertIsNotNone(self.operatingsys.search(name))
            make_os(session, name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family=os_family, archs=[arch])
            self.assertIsNotNone(self.operatingsys.wait_until_element
                                 (common_locators["haserror"]))
            self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 2
0
    def test_negative_create_with_same_name_and_version(self):
        """OS - Create a new OS with same name and version

        :id: f1865efe-bdc0-4065-90b8-b48c9fad80bb

        :expectedresults: OS is not created

        :CaseLevel: Integration
        """
        name = gen_string('alpha')
        major_version = gen_string('numeric', 1)
        minor_version = gen_string('numeric', 1)
        with Session(self) as session:
            make_os(session,
                    name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family='Red Hat',
                    archs=['x86_64'])
            self.assertIsNotNone(self.operatingsys.search(name))
            make_os(session,
                    name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family='Red Hat',
                    archs=['x86_64'])
            self.assertIsNotNone(
                self.operatingsys.wait_until_element(
                    common_locators['haserror']))
Ejemplo n.º 3
0
 def test_negative_create_os_8(self):
     """
     @Test: OS - Create a new OS with same name and version
     @Feature: Create a new OS - Negative
     @Assert: OS is not created
     @BZ: 1120985
     """
     name = generate_string("alpha", 6)
     major_version = generate_string('numeric', 1)
     minor_version = generate_string('numeric', 1)
     os_family = "Red Hat"
     arch = "x86_64"
     with Session(self.browser) as session:
         make_os(session, name=name,
                 major_version=major_version,
                 minor_version=minor_version,
                 os_family=os_family, archs=[arch])
         self.assertIsNotNone(self.operatingsys.search(name))
         make_os(session, name=name,
                 major_version=major_version,
                 minor_version=minor_version,
                 os_family=os_family, archs=[arch])
         self.assertIsNotNone(self.operatingsys.wait_until_element
                              (common_locators["haserror"]))
         self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 4
0
    def test_update_os_1(self):
        """
        @Test: Update OS name, major_version, minor_version, os_family
        and arch
        @Feature: OS - Positive Update
        @Assert: OS is updated
        """

        name = generate_string("alpha", 6)
        major_version = generate_string('numeric', 1)
        minor_version = generate_string('numeric', 1)
        os_family = "Red Hat"
        new_name = generate_string("alpha", 4)
        new_major_version = generate_string('numeric', 1)
        new_minor_version = generate_string('numeric', 1)
        new_os_family = "Debian"
        new_arch = generate_string("alpha", 4)
        with Session(self.browser) as session:
            make_arch(session, name=new_arch)
            self.assertIsNotNone(self.architecture.search(new_arch))
            make_os(session, name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family=os_family)
            self.assertIsNotNone(self.operatingsys.search(name))
            self.operatingsys.update(name, new_name, new_major_version,
                                     new_minor_version,
                                     os_family=new_os_family,
                                     new_archs=[new_arch])
            self.assertIsNotNone(self.operatingsys.search(new_name))
Ejemplo n.º 5
0
    def test_update_os_template(self):
        """
        @Test: Update provisioning template
        @Feature: OS - Positive Update
        @Assert: OS is updated
        @BZ: 1129612
        """

        os_name = generate_string("alpha", 6)
        major_version = generate_string('numeric', 1)
        template_name = generate_string("alpha", 4)
        temp_type = 'provision'
        template_path = get_data_file(OS_TEMPLATE_DATA_FILE)
        os_list = [os_name]
        with Session(self.browser) as session:
            make_os(session, name=os_name,
                    major_version=major_version)
            self.assertIsNotNone(self.operatingsys.search(os_name))
            make_templates(session, name=template_name,
                           template_path=template_path,
                           custom_really=True, template_type=temp_type,
                           os_list=os_list)
            self.assertIsNotNone(self.template.search(template_name))
            self.navigator.go_to_operating_systems()
            self.operatingsys.update(os_name, template=template_name)
            result_obj = self.operatingsys.get_os_entities(os_name, "template")
            self.assertEqual(template_name, result_obj['template'])
Ejemplo n.º 6
0
    def test_negative_create_with_invalid_minor_version(self):
        """OS - Create a new OS with incorrect minor version value
        (More than 16 characters and negative number)

        :id: 2828cd68-d57a-4e3e-bced-90937290251e

        :expectedresults: OS is not created

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        with Session(self) as session:
            for minor_version in gen_string('numeric', 17), '-5':
                with self.subTest(minor_version):
                    make_os(
                        session,
                        name=name,
                        major_version=gen_string('numeric', 1),
                        minor_version=minor_version,
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(
                        self.operatingsys.wait_until_element(
                            common_locators['haserror']))
                    self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 7
0
    def test_update_template_os(self):
        """@Test: Creates new template, along with two OS's
        and associate list of OS's with created template

        @Feature: Template - Positive Update

        @Assert: The template should be updated with newly created OS's
        successfully

        @BZ: 1129612

        """
        name = generate_string("alpha", 6)
        new_name = generate_string("alpha", 6)
        temp_type = 'provision'
        os_name1 = generate_string("alpha", 6)
        os_name2 = generate_string("alpha", 6)
        os_list = [os_name1, os_name2]
        major_version = generate_string('numeric', 1)
        template_path = get_data_file(OS_TEMPLATE_DATA_FILE)
        with Session(self.browser) as session:
            for os_name in os_list:
                make_os(session, name=os_name,
                        major_version=major_version)
                self.assertIsNotNone(self.operatingsys.search(os_name))
            make_templates(session, name=name, template_path=template_path,
                           custom_really=True, template_type=temp_type)
            self.assertIsNotNone(self.template.search(name))
            self.template.update(name, False, new_name, new_os_list=os_list)
            self.assertIsNotNone(self.template.search(new_name))
Ejemplo n.º 8
0
    def test_negative_create_os_7(self):
        """@Test: OS - Create a new OS with -ve value of major version

        @Feature: Create a new OS - Negative

        @Assert: OS is not created

        @BZ: 1120199

        """
        name = gen_string("alpha", 6)
        major_version = "-6"
        minor_version = "-5"
        os_family = "Red Hat"
        arch = "x86_64"
        with Session(self.browser) as session:
            make_os(
                session,
                name=name,
                major_version=major_version,
                minor_version=minor_version,
                os_family=os_family,
                archs=[arch],
            )
            self.assertIsNotNone(self.operatingsys.wait_until_element(common_locators["haserror"]))
            self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 9
0
    def test_negative_create_with_same_name_and_version(self):
        """OS - Create a new OS with same name and version

        :id: f1865efe-bdc0-4065-90b8-b48c9fad80bb

        :expectedresults: OS is not created

        :CaseLevel: Integration
        """
        name = gen_string('alpha')
        major_version = gen_string('numeric', 1)
        minor_version = gen_string('numeric', 1)
        with Session(self) as session:
            make_os(
                session,
                name=name,
                major_version=major_version,
                minor_version=minor_version,
                os_family='Red Hat',
                archs=['x86_64']
            )
            self.assertIsNotNone(self.operatingsys.search(name))
            make_os(
                session,
                name=name,
                major_version=major_version,
                minor_version=minor_version,
                os_family='Red Hat',
                archs=['x86_64']
            )
            self.assertIsNotNone(self.operatingsys.wait_until_element(
                common_locators['haserror']))
Ejemplo n.º 10
0
    def test_negative_create_with_invalid_minor_version(self):
        """OS - Create a new OS with incorrect minor version value
        (More than 16 characters and negative number)

        :id: 2828cd68-d57a-4e3e-bced-90937290251e

        :expectedresults: OS is not created

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        with Session(self) as session:
            for minor_version in gen_string('numeric', 17), '-5':
                with self.subTest(minor_version):
                    make_os(
                        session,
                        name=name,
                        major_version=gen_string('numeric', 1),
                        minor_version=minor_version,
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(self.operatingsys.wait_until_element(
                        common_locators['haserror']))
                    self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 11
0
    def test_negative_create_with_invalid_major_version(self):
        """OS - Create a new OS with incorrect major version value
        (More than 5 characters, empty value, negative number)

        :id: 89d061a8-cb4c-4460-a7fb-7cea73c323af

        :expectedresults: OS is not created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for major_version in gen_string('numeric', 6), '', '-6':
                with self.subTest(major_version):
                    name = gen_string('alpha')
                    make_os(
                        session,
                        name=name,
                        major_version=major_version,
                        minor_version=gen_string('numeric', 1),
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(self.operatingsys.wait_until_element(
                        common_locators['haserror']))
                    self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 12
0
    def test_negative_create_os_with_same_name_and_version(self):
        """@Test: OS - Create a new OS with same name and version

        @Feature: Create a new OS - Negative

        @Assert: OS is not created

        @BZ: 1120985

        """
        name = gen_string('alpha')
        major_version = gen_string('numeric', 1)
        minor_version = gen_string('numeric', 1)
        with Session(self.browser) as session:
            make_os(
                session,
                name=name,
                major_version=major_version,
                minor_version=minor_version,
                os_family='Red Hat',
                archs=['x86_64']
            )
            self.assertIsNotNone(self.operatingsys.search(name))
            make_os(
                session,
                name=name,
                major_version=major_version,
                minor_version=minor_version,
                os_family='Red Hat',
                archs=['x86_64']
            )
            self.assertIsNotNone(self.operatingsys.wait_until_element
                                 (common_locators['haserror']))
    def test_negative_create_with_same_name_and_version(self):
        """OS - Create a new OS with same name and version

        @Feature: Create a new OS - Negative

        @Assert: OS is not created
        """
        name = gen_string('alpha')
        major_version = gen_string('numeric', 1)
        minor_version = gen_string('numeric', 1)
        with Session(self.browser) as session:
            make_os(session,
                    name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family='Red Hat',
                    archs=['x86_64'])
            self.assertIsNotNone(self.operatingsys.search(name))
            make_os(session,
                    name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family='Red Hat',
                    archs=['x86_64'])
            self.assertIsNotNone(
                self.operatingsys.wait_until_element(
                    common_locators['haserror']))
Ejemplo n.º 14
0
    def test_negative_create_with_invalid_major_version(self):
        """OS - Create a new OS with incorrect major version value
        (More than 5 characters, empty value, negative number)

        :id: 89d061a8-cb4c-4460-a7fb-7cea73c323af

        :expectedresults: OS is not created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for major_version in gen_string('numeric', 6), '', '-6':
                with self.subTest(major_version):
                    name = gen_string('alpha')
                    make_os(
                        session,
                        name=name,
                        major_version=major_version,
                        minor_version=gen_string('numeric', 1),
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(
                        self.operatingsys.wait_until_element(
                            common_locators['haserror']))
                    self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 15
0
    def test_negative_set_os_parameter_2(self):
        """@Test: Set OS parameter with blank name and value

        @Feature: OS - Negative Update

        @Assert: Proper error should be raised, Name can't contain whitespaces

        @BZ: 1120663

        """
        name = generate_string("alpha", 4)
        major_version = generate_string('numeric', 1)
        param_name = " "
        param_value = " "
        with Session(self.browser) as session:
            make_os(session, name=name,
                    major_version=major_version)
            self.assertIsNotNone(self.operatingsys.search(name))
            try:
                self.operatingsys.set_os_parameter(name, param_name,
                                                   param_value)
            except Exception as e:
                self.fail(e)
            self.assertIsNotNone(self.operatingsys.wait_until_element
                                 (common_locators["common_param_error"]))
Ejemplo n.º 16
0
    def test_negative_set_os_parameter_1(self):
        """@Test: Set same OS parameter again as it was set earlier

        @Feature: OS - Negative Update

        @Assert: Proper error should be raised, Name already taken

        @BZ: 1120663

        """
        name = generate_string("alpha", 4)
        major_version = generate_string('numeric', 1)
        param_name = generate_string("alpha", 4)
        param_value = generate_string("alpha", 3)
        with Session(self.browser) as session:
            make_os(session, name=name,
                    major_version=major_version)
            self.assertIsNotNone(self.operatingsys.search(name))
            try:
                self.operatingsys.set_os_parameter(name, param_name,
                                                   param_value)
                self.operatingsys.set_os_parameter(name, param_name,
                                                   param_value)
            except Exception as e:
                self.fail(e)
            self.assertIsNotNone(self.operatingsys.wait_until_element
                                 (common_locators["common_param_error"]))
Ejemplo n.º 17
0
    def test_negative_create_os_5(self):
        """@Test: OS - Create a new OS with long minor version (More than 16
        characters in minor version)

        @Feature: Create a new OS - Negative

        @Assert: OS is not created

        """
        name = gen_string("alpha", 6)
        major_version = gen_string("numeric", 1)
        minor_version = gen_string("numeric", 17)
        os_family = "Red Hat"
        arch = "x86_64"
        with Session(self.browser) as session:
            make_os(
                session,
                name=name,
                major_version=major_version,
                minor_version=minor_version,
                os_family=os_family,
                archs=[arch],
            )
            self.assertIsNotNone(self.operatingsys.wait_until_element(common_locators["haserror"]))
            self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 18
0
    def test_positive_create_arch_1(self, test_data):
        """@Test: Create a new Architecture with OS

        @Feature: Architecture - Positive Create

        @Assert: Architecture is created

        """

        with Session(self.browser) as session:
            make_os(session, name=test_data['os_name'],
                    major_version=test_data['major_version'])
            self.assertIsNotNone(self.operatingsys.search
                                 (test_data['os_name']))
            make_arch(session, name=test_data['name'],
                      os_names=[test_data['os_name']])
            self.assertIsNotNone(self.architecture.search(test_data['name']))
Ejemplo n.º 19
0
    def test_positive_create_os(self, test_data):
        """
        @Test: Create a new OS with different data values
        @Feature: OS - Positive Create
        @Assert: OS is created
        @BZ: 1120568
        """

        arch = "i386"
        with Session(self.browser) as session:
            make_os(session, name=test_data['name'],
                    major_version=test_data['major_version'],
                    minor_version=test_data['minor_version'],
                    description=test_data['desc'],
                    os_family=test_data['os_family'], archs=[arch])
            self.assertIsNotNone(self.operatingsys.search
                                 (test_data['desc'], search_key="description"))
Ejemplo n.º 20
0
    def test_create_os_with_different_names(self, name):
        """@Test: Create a new OS using different string types as a name

        @Feature: OS - Positive Create

        @Assert: OS is created

        """
        with Session(self.browser) as session:
            make_os(
                session,
                name=name,
                major_version=gen_string('numeric', 1),
                minor_version=gen_string('numeric', 1),
                os_family='Red Hat',
                archs=['x86_64'],
            )
            self.assertIsNotNone(self.operatingsys.search(name))
Ejemplo n.º 21
0
    def test_create_os(self):
        """
        @Test: Create a new OS
        @Feature: OS - Positive Create
        @Assert: OS is created
        """

        name = generate_string("alpha", 6)
        major_version = generate_string('numeric', 1)
        minor_version = generate_string('numeric', 1)
        os_family = "Red Hat"
        arch = "x86_64"
        with Session(self.browser) as session:
            make_os(session, name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family=os_family, archs=[arch])
            self.assertIsNotNone(self.operatingsys.search(name))
Ejemplo n.º 22
0
 def test_negative_create_os_2(self):
     """
     @Test: OS - Create a new OS with blank name
     @Feature: Create a new OS - Negative
     @Assert: OS is not created
     """
     name = ""
     major_version = generate_string('numeric', 1)
     minor_version = generate_string('numeric', 1)
     os_family = "Red Hat"
     arch = "x86_64"
     with Session(self.browser) as session:
         make_os(session, name=name,
                 major_version=major_version,
                 minor_version=minor_version,
                 os_family=os_family, archs=[arch])
         self.assertIsNotNone(self.operatingsys.wait_until_element
                              (common_locators["name_haserror"]))
Ejemplo n.º 23
0
    def test_positive_create_with_name(self):
        """Create a new OS using different string types as a name

        @id: 08cb212e-586f-4630-af1b-ad3e749e82e7

        @Assert: OS is created
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_os(
                        session,
                        name=name,
                        major_version=gen_string('numeric', 1),
                        minor_version=gen_string('numeric', 1),
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(self.operatingsys.search(name))
Ejemplo n.º 24
0
    def test_negative_create_os_with_blank_name(self):
        """@Test: OS - Create a new OS with blank name

        @Feature: Create a new OS - Negative

        @Assert: OS is not created

        """
        with Session(self.browser) as session:
            make_os(
                session,
                name='',
                major_version=gen_string('numeric', 1),
                minor_version=gen_string('numeric', 1),
                os_family='Red Hat',
                archs=['x86_64']
            )
            self.assertIsNotNone(self.operatingsys.wait_until_element
                                 (common_locators['name_haserror']))
Ejemplo n.º 25
0
    def test_positive_create_with_name(self):
        """Create a new OS using different string types as a name

        @Feature: OS - Positive Create

        @Assert: OS is created
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_os(
                        session,
                        name=name,
                        major_version=gen_string('numeric', 1),
                        minor_version=gen_string('numeric', 1),
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(self.operatingsys.search(name))
Ejemplo n.º 26
0
 def test_positive_set_os_parameter_2(self):
     """
     @Test: Set OS parameter with blank value
     @Feature: OS - Positive update
     @Assert: Parameter is created with blank value
     """
     name = generate_string("alpha", 4)
     major_version = generate_string('numeric', 1)
     param_name = generate_string("alpha", 4)
     param_value = ""
     with Session(self.browser) as session:
         make_os(session, name=name,
                 major_version=major_version)
         self.assertIsNotNone(self.operatingsys.search(name))
         try:
             self.operatingsys.set_os_parameter(name, param_name,
                                                param_value)
         except Exception as e:
             self.fail(e)
Ejemplo n.º 27
0
 def test_remove_os_parameter(self):
     """
     @Test: Remove selected OS parameter
     @Feature: OS - Positive Update
     @Assert: OS is updated
     """
     name = generate_string("alpha", 6)
     major_version = generate_string('numeric', 1)
     param_name = generate_string("alpha", 4)
     param_value = generate_string("alpha", 3)
     with Session(self.browser) as session:
         make_os(session, name=name,
                 major_version=major_version)
         try:
             self.operatingsys.set_os_parameter(name, param_name,
                                                param_value)
             self.operatingsys.remove_os_parameter(name, param_name)
         except Exception as e:
             self.fail(e)
Ejemplo n.º 28
0
    def test_negative_create_os_2(self):
        """@Test: OS - Create a new OS with blank name

        @Feature: Create a new OS - Negative

        @Assert: OS is not created

        """
        name = ""
        major_version = gen_string('numeric', 1)
        minor_version = gen_string('numeric', 1)
        os_family = "Red Hat"
        arch = "x86_64"
        with Session(self.browser) as session:
            make_os(session, name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family=os_family, archs=[arch])
            self.assertIsNotNone(self.operatingsys.wait_until_element
                                 (common_locators["name_haserror"]))
Ejemplo n.º 29
0
    def test_update_os_medium(self):
        """
        @Test: Update OS medium
        @Feature: OS - Positive Update
        @Assert: OS is updated
        """

        name = generate_string("alpha", 6)
        major_version = generate_string('numeric', 1)
        medium = generate_string("alpha", 4)
        path = INSTALL_MEDIUM_URL % generate_string("alpha", 6)
        with Session(self.browser) as session:
            make_media(session, name=medium, path=path)
            self.assertIsNotNone(self.medium.search(medium))
            make_os(session, name=name,
                    major_version=major_version)
            self.assertIsNotNone(self.operatingsys.search(name))
            self.operatingsys.update(name, new_mediums=[medium])
            result_object = self.operatingsys.get_os_entities(name, "medium")
            self.assertEqual(medium, result_object['medium'])
Ejemplo n.º 30
0
    def test_create_os(self):
        """@Test: Create a new OS

        @Feature: OS - Positive Create

        @Assert: OS is created

        """

        name = gen_string("alpha", 6)
        major_version = gen_string('numeric', 1)
        minor_version = gen_string('numeric', 1)
        os_family = "Red Hat"
        arch = "x86_64"
        with Session(self.browser) as session:
            make_os(session, name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family=os_family, archs=[arch])
            self.assertIsNotNone(self.operatingsys.search(name))
Ejemplo n.º 31
0
    def test_negative_create_with_invalid_name(self):
        """OS - Create a new OS with invalid name

        @Feature: Create a new OS - Negative

        @Assert: OS is not created
        """
        with Session(self.browser) as session:
            for name in invalid_values_list(interface='ui'):
                with self.subTest(name):
                    make_os(
                        session,
                        name=name,
                        major_version=gen_string('numeric', 1),
                        minor_version=gen_string('numeric', 1),
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(self.operatingsys.wait_until_element(
                        common_locators['name_haserror']))
Ejemplo n.º 32
0
    def test_positive_create_os(self, test_data):
        """@Test: Create a new OS with different data values

        @Feature: OS - Positive Create

        @Assert: OS is created

        @BZ: 1120568

        """

        arch = "i386"
        with Session(self.browser) as session:
            make_os(session, name=test_data['name'],
                    major_version=test_data['major_version'],
                    minor_version=test_data['minor_version'],
                    description=test_data['desc'],
                    os_family=test_data['os_family'], archs=[arch])
            self.assertIsNotNone(self.operatingsys.search
                                 (test_data['desc'], search_key="description"))
Ejemplo n.º 33
0
 def test_negative_set_os_parameter_3(self):
     """
     @Test: Set OS parameter with name and value exceeding 255 characters
     @Feature: OS - Negative Update
     @Assert: Proper error should be raised, Name should contain a value
     """
     name = generate_string("alpha", 4)
     major_version = generate_string('numeric', 1)
     param_name = generate_string("alpha", 256)
     param_value = generate_string("alpha", 256)
     with Session(self.browser) as session:
         make_os(session, name=name,
                 major_version=major_version)
         self.assertIsNotNone(self.operatingsys.search(name))
         try:
             self.operatingsys.set_os_parameter(name, param_name,
                                                param_value)
         except Exception as e:
             self.fail(e)
         self.assertIsNotNone(self.operatingsys.wait_until_element
                              (common_locators["common_param_error"]))
Ejemplo n.º 34
0
    def test_negative_create_with_too_long_description(self):
        """OS - Create a new OS with description containing
        256 characters

        @id: 7f395b9a-2d48-468a-937b-bba4e6576ba9

        @Assert: OS is not created
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_os(session,
                    name=gen_string('alpha', 6),
                    major_version=gen_string('numeric', 1),
                    minor_version=gen_string('numeric', 1),
                    description=gen_string('alphanumeric', 256),
                    os_family='Red Hat',
                    archs=['x86_64'])
            self.assertIsNotNone(
                self.operatingsys.wait_until_element(
                    common_locators['haserror']))
            self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 35
0
    def test_remove_arch(self, test_data):
        """@Test: Delete an existing Architecture

        @Feature: Architecture - Delete

        @Assert: Architecture is deleted

        @BZ: 1131815

        """

        with Session(self.browser) as session:
            make_os(session, name=test_data['os_name'],
                    major_version=test_data['major_version'])
            self.assertIsNotNone(self.operatingsys.search
                                 (test_data['os_name']))
            make_arch(session, name=test_data['name'],
                      os_names=[test_data['os_name']])
            self.assertIsNotNone(self.architecture.search(test_data['name']))
            self.architecture.delete(test_data['name'], True)
            self.assertIsNone(self.architecture.search(test_data['name']))
Ejemplo n.º 36
0
    def test_negative_create_with_invalid_name(self):
        """OS - Create a new OS with invalid name

        @id: aa035ef6-a503-48c4-b95a-021a03a145c0

        @Assert: OS is not created
        """
        with Session(self.browser) as session:
            for name in invalid_values_list(interface='ui'):
                with self.subTest(name):
                    make_os(
                        session,
                        name=name,
                        major_version=gen_string('numeric', 1),
                        minor_version=gen_string('numeric', 1),
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(
                        self.operatingsys.wait_until_element(
                            common_locators['name_haserror']))
Ejemplo n.º 37
0
    def test_positive_create_with_name(self):
        """Create a new OS using different string types as a name

        :id: 08cb212e-586f-4630-af1b-ad3e749e82e7

        :expectedresults: OS is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_os(
                        session,
                        name=name,
                        major_version=gen_string('numeric', 1),
                        minor_version=gen_string('numeric', 1),
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(self.operatingsys.search(name))
Ejemplo n.º 38
0
    def test_remove_os(self):
        """
        @Test: Delete an existing OS
        @Feature: OS - Positive Delete
        @Assert: OS is deleted
        """

        name = generate_string("alpha", 6)
        major_version = generate_string('numeric', 1)
        minor_version = generate_string('numeric', 1)
        os_family = "Red Hat"
        with Session(self.browser) as session:
            make_os(session, name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    os_family=os_family)
            self.assertIsNotNone(self.operatingsys.search(name))
            self.operatingsys.delete(name, really=True)
            self.assertIsNotNone(self.user.wait_until_element
                                 (common_locators["notif.success"]))
            self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 39
0
    def test_positive_create(self):
        """Create a new OS with different data values

        @id: fcb41aff-c963-403b-a80f-5f9c467d0632

        @Assert: OS is created
        """
        with Session(self.browser) as session:
            for test_data in valid_os_parameters():
                with self.subTest(test_data):
                    make_os(
                        session,
                        name=test_data['name'],
                        major_version=test_data['major_version'],
                        minor_version=test_data['minor_version'],
                        description=test_data['desc'],
                        os_family=test_data['os_family'],
                        archs=['i386'],
                    )
                    self.operatingsys.search_key = 'description'
                    self.assertIsNotNone(
                        self.operatingsys.search(test_data['desc']))
Ejemplo n.º 40
0
    def test_update_os_partition_table(self):
        """
        @Test: Update OS partition table
        @Feature: OS - Positive Update
        @Assert: OS is updated
        """

        name = generate_string("alpha", 6)
        major_version = generate_string('numeric', 1)
        ptable = generate_string("alpha", 4)
        script_file = get_data_file(PARTITION_SCRIPT_DATA_FILE)
        with open(script_file, 'r') as file_contents:
            layout = file_contents.read()
        with Session(self.browser) as session:
            make_partitiontable(session, name=ptable, layout=layout)
            self.assertIsNotNone(self.partitiontable.search(ptable))
            make_os(session, name=name,
                    major_version=major_version)
            self.assertIsNotNone(self.operatingsys.search(name))
            self.operatingsys.update(name, new_ptables=[ptable])
            result_object = self.operatingsys.get_os_entities(name, "ptable")
            self.assertEqual(ptable, result_object['ptable'])
Ejemplo n.º 41
0
 def test_negative_create_os_3(self):
     """
     @Test: OS - Create a new OS with description containing
     256 characters
     @Feature: Create a new OS - Negative
     @Assert: OS is not created
     """
     name = generate_string("alpha", 6)
     major_version = generate_string('numeric', 1)
     minor_version = generate_string('numeric', 1)
     description = generate_string("alphanumeric", 256)
     os_family = "Red Hat"
     arch = "x86_64"
     with Session(self.browser) as session:
         make_os(session, name=name,
                 major_version=major_version,
                 minor_version=minor_version,
                 description=description,
                 os_family=os_family, archs=[arch])
         self.assertIsNotNone(self.operatingsys.wait_until_element
                              (common_locators["haserror"]))
         self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 42
0
    def test_negative_create_os_with_wrong_minor_version(self, minor_version):
        """@Test: OS - Create a new OS with incorrect minor version value(More than 16
        characters and negative number)

        @Feature: Create a new OS - Negative

        @Assert: OS is not created

        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_os(
                session,
                name=name,
                major_version=gen_string('numeric', 1),
                minor_version=minor_version,
                os_family='Red Hat',
                archs=['x86_64']
            )
            self.assertIsNotNone(self.operatingsys.wait_until_element
                                 (common_locators['haserror']))
            self.assertIsNone(self.operatingsys.search(name))
    def test_negative_create_with_invalid_minor_version(self):
        """OS - Create a new OS with incorrect minor version value
        (More than 16 characters and negative number)

        @Feature: Create a new OS - Negative

        @Assert: OS is not created
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            for minor_version in gen_string('numeric', 17), '-5':
                with self.subTest(minor_version):
                    make_os(
                        session,
                        name=name,
                        major_version=gen_string('numeric', 1),
                        minor_version=minor_version,
                        os_family='Red Hat',
                        archs=['x86_64'],
                    )
                    self.assertIsNotNone(
                        self.operatingsys.wait_until_element(
                            common_locators['haserror']))
                    self.assertIsNone(self.operatingsys.search(name))
Ejemplo n.º 44
0
    def test_negative_create_os_3(self):
        """@Test: OS - Create a new OS with description containing
        256 characters

        @Feature: Create a new OS - Negative

        @Assert: OS is not created

        """
        name = gen_string("alpha", 6)
        major_version = gen_string('numeric', 1)
        minor_version = gen_string('numeric', 1)
        description = gen_string("alphanumeric", 256)
        os_family = "Red Hat"
        arch = "x86_64"
        with Session(self.browser) as session:
            make_os(session, name=name,
                    major_version=major_version,
                    minor_version=minor_version,
                    description=description,
                    os_family=os_family, archs=[arch])
            self.assertIsNotNone(self.operatingsys.wait_until_element
                                 (common_locators["haserror"]))
            self.assertIsNone(self.operatingsys.search(name))