Esempio n. 1
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))
Esempio n. 2
0
    def test_positive_create_arch_with_different_names(self, name):
        """@Test: Create a new Architecture with different data

        @Feature: Architecture - Positive Create

        @Assert: Architecture is created

        """
        with Session(self.browser) as session:
            make_arch(session, name=name)
            self.assertIsNotNone(self.architecture.search(name))
Esempio n. 3
0
    def test_positive_create_with_name(self):
        """Create a new Architecture with different data

        @id: 0ac5f63b-b296-425b-8bb2-e0fe32d394c5

        @Assert: Architecture is created
        """
        with Session(self.browser) as session:
            for name in generate_strings_list():
                with self.subTest(name):
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.search(name))
Esempio n. 4
0
    def test_positive_create_with_name(self):
        """Create a new Architecture with different data

        @Feature: Architecture - Positive Create

        @Assert: Architecture is created
        """
        with Session(self.browser) as session:
            for name in generate_strings_list():
                with self.subTest(name):
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.search(name))
Esempio n. 5
0
    def test_negative_create_arch_2(self, name):
        """@Test: Create a new Architecture with whitespace in name

        @Feature: Architecture - Negative Create

        @Assert: Architecture is not created

        """
        with Session(self.browser) as session:
            make_arch(session, name=name)
            self.assertIsNotNone(self.architecture.wait_until_element
                                 (common_locators["name_haserror"]))
    def test_positive_create_with_os(self):
        """Create a new Architecture with OS

        @id: 6c386230-2285-4f41-a3a5-6a17ae844f80

        @Assert: Architecture is created
        """
        with Session(self.browser) as session:
            for test_data in valid_arch_os_names():
                with self.subTest(test_data):
                    entities.OperatingSystem(name=test_data["os_name"]).create()
                    make_arch(session, name=test_data["name"], os_names=[test_data["os_name"]])
                    self.assertIsNotNone(self.architecture.search(test_data["name"]))
Esempio n. 7
0
    def test_negative_create_arch(self, name):
        """@Test: Try to create architecture and use whitespace, blank, tab
        symbol or too long string of different types as its name value

        @Feature: Architecture - Negative Create

        @Assert: Architecture is not created

        """
        with Session(self.browser) as session:
            make_arch(session, name=name)
            self.assertIsNotNone(self.architecture.wait_until_element
                                 (common_locators['name_haserror']))
    def test_negative_create_with_invalid_name(self):
        """Try to create architecture and use whitespace, blank, tab
        symbol or too long string of different types as its name value

        @id: f4b8ed72-f20b-4f5d-bf0a-3475a6124f3a

        @Assert: Architecture is not created
        """
        with Session(self.browser) as session:
            for invalid_name in invalid_values_list(interface="ui"):
                with self.subTest(invalid_name):
                    make_arch(session, name=invalid_name)
                    self.assertIsNotNone(self.architecture.wait_until_element(common_locators["name_haserror"]))
Esempio n. 9
0
    def test_positive_create_arch_with_os(self, test_data):
        """@Test: Create a new Architecture with OS

        @Feature: Architecture - Positive Create

        @Assert: Architecture is created

        """
        entities.OperatingSystem(name=test_data['os_name']).create()
        with Session(self.browser) as session:
            make_arch(session, name=test_data['name'],
                      os_names=[test_data['os_name']])
            self.assertIsNotNone(self.architecture.search(test_data['name']))
Esempio n. 10
0
    def test_negative_create_with_invalid_name(self):
        """Try to create architecture and use whitespace, blank, tab
        symbol or too long string of different types as its name value

        @Feature: Architecture - Negative Create

        @Assert: Architecture is not created
        """
        with Session(self.browser) as session:
            for invalid_name in invalid_values_list(interface='ui'):
                with self.subTest(invalid_name):
                    make_arch(session, name=invalid_name)
                    self.assertIsNotNone(self.architecture.wait_until_element(
                        common_locators['name_haserror']))
Esempio n. 11
0
    def test_positive_create_with_name(self):
        """Create a new Architecture with different data

        :id: 0ac5f63b-b296-425b-8bb2-e0fe32d394c5

        :expectedresults: Architecture is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in generate_strings_list():
                with self.subTest(name):
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.search(name))
Esempio n. 12
0
    def test_negative_create_with_same_name(self):
        """Create a new Architecture with same name

        @id: 4000674e-7b39-4958-8992-1363b25b2cd6

        @Assert: Architecture is not created
        """
        with Session(self.browser) as session:
            for name in generate_strings_list():
                with self.subTest(name):
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.search(name))
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.wait_until_element(common_locators["name_haserror"]))
Esempio n. 13
0
    def test_negative_create_with_same_name(self):
        """Create a new Architecture with same name

        @Feature: Architecture - Negative Create

        @Assert: Architecture is not created
        """
        with Session(self.browser) as session:
            for name in generate_strings_list():
                with self.subTest(name):
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.search(name))
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.wait_until_element(
                        common_locators['name_haserror']))
Esempio n. 14
0
    def test_negative_create_with_invalid_name(self):
        """Try to create architecture and use whitespace, blank, tab
        symbol or too long string of different types as its name value

        :id: f4b8ed72-f20b-4f5d-bf0a-3475a6124f3a

        :expectedresults: Architecture is not created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for invalid_name in invalid_values_list(interface='ui'):
                with self.subTest(invalid_name):
                    make_arch(session, name=invalid_name)
                    self.assertIsNotNone(self.architecture.wait_until_element(
                        common_locators['name_haserror']))
Esempio n. 15
0
    def test_update_arch(self, name):
        """@Test: Update Architecture with new name and OS

        @Feature: Architecture - Update

        @Assert: Architecture is updated

        """
        old_name = gen_string('alpha')
        os_name = gen_string('alpha')
        entities.OperatingSystem(name=os_name).create()
        with Session(self.browser) as session:
            make_arch(session, name=old_name)
            self.assertIsNotNone(self.architecture.search(old_name))
            self.architecture.update(old_name, name, new_os_names=[os_name])
            self.assertIsNotNone(self.architecture.search(name))
Esempio n. 16
0
    def test_positive_create_with_os(self):
        """Create a new Architecture with OS

        @Feature: Architecture - Positive Create

        @Assert: Architecture is created
        """
        with Session(self.browser) as session:
            for test_data in valid_arch_os_names():
                with self.subTest(test_data):
                    entities.OperatingSystem(
                        name=test_data['os_name']).create()
                    make_arch(session, name=test_data['name'],
                              os_names=[test_data['os_name']])
                    self.assertIsNotNone(
                        self.architecture.search(test_data['name']))
Esempio n. 17
0
    def test_negative_create_with_invalid_name(self):
        """Try to create architecture and use whitespace, blank, tab
        symbol or too long string of different types as its name value

        :id: f4b8ed72-f20b-4f5d-bf0a-3475a6124f3a

        :expectedresults: Architecture is not created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for invalid_name in invalid_values_list(interface='ui'):
                with self.subTest(invalid_name):
                    make_arch(session, name=invalid_name)
                    self.assertIsNotNone(
                        self.architecture.wait_until_element(
                            common_locators['name_haserror']))
Esempio n. 18
0
    def test_remove_architecture(self, name):
        """@Test: Delete an existing Architecture

        @Feature: Architecture - Delete

        @Assert: Architecture is deleted

        @BZ: 1131815

        """
        os_name = gen_string('alpha')
        entities.OperatingSystem(name=os_name).create()
        with Session(self.browser) as session:
            make_arch(session, name=name, os_names=[os_name])
            self.assertIsNotNone(self.architecture.search(name))
            self.architecture.delete(name)
            self.assertIsNone(self.architecture.search(name))
Esempio n. 19
0
    def test_negative_create_with_same_name(self):
        """Create a new Architecture with same name

        :id: 4000674e-7b39-4958-8992-1363b25b2cd6

        :expectedresults: Architecture is not created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in generate_strings_list():
                with self.subTest(name):
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.search(name))
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.wait_until_element(
                        common_locators['name_haserror']))
Esempio n. 20
0
    def test_remove_arch(self, test_data):
        """@Test: Delete an existing Architecture

        @Feature: Architecture - Delete

        @Assert: Architecture is deleted

        @BZ: 1131815

        """
        entities.OperatingSystem(name=test_data['os_name']).create_json()
        with Session(self.browser) as session:
            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']))
Esempio n. 21
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']))
Esempio n. 22
0
    def test_negative_create_with_same_name(self):
        """Create a new Architecture with same name

        :id: 4000674e-7b39-4958-8992-1363b25b2cd6

        :expectedresults: Architecture is not created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in generate_strings_list():
                with self.subTest(name):
                    make_arch(session, name=name)
                    self.assertIsNotNone(self.architecture.search(name))
                    make_arch(session, name=name)
                    self.assertIsNotNone(
                        self.architecture.wait_until_element(
                            common_locators['name_haserror']))
Esempio n. 23
0
    def test_positive_update_name_and_os(self):
        """Update Architecture with new name and OS

        @id: cbb2e8fc-1dde-42c4-aab0-479bd16fb5ec

        @Assert: Architecture is updated
        """
        old_name = gen_string("alpha")
        with Session(self.browser) as session:
            make_arch(session, name=old_name)
            self.assertIsNotNone(self.architecture.search(old_name))
            for new_name in generate_strings_list():
                with self.subTest(new_name):
                    os_name = gen_string("alpha")
                    entities.OperatingSystem(name=os_name).create()
                    self.architecture.update(old_name, new_name, new_os_names=[os_name])
                    self.assertIsNotNone(self.architecture.search(new_name))
                    old_name = new_name  # for next iteration
    def test_update_arch(self, test_data):
        """@Test: Update Architecture with new name and OS

        @Feature: Architecture - Update

        @Assert: Architecture is updated

        """
        entities.OperatingSystem(name=test_data['os_name']).create()
        with Session(self.browser) as session:
            make_arch(session, name=test_data['old_name'])
            self.assertIsNotNone(self.architecture.search
                                 (test_data['old_name']))
            self.architecture.update(test_data['old_name'],
                                     test_data['new_name'],
                                     new_os_names=[test_data['os_name']])
            self.assertIsNotNone(self.architecture.search
                                 (test_data['new_name']))
Esempio n. 25
0
    def test_remove_arch(self, test_data):
        """@Test: Delete an existing Architecture

        @Feature: Architecture - Delete

        @Assert: Architecture is deleted

        @BZ: 1131815

        """
        entities.OperatingSystem(name=test_data['os_name']).create()
        with Session(self.browser) as session:
            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']))
Esempio n. 26
0
    def test_update_arch(self, test_data):
        """@Test: Update Architecture with new name and OS

        @Feature: Architecture - Update

        @Assert: Architecture is updated

        """
        entities.OperatingSystem(name=test_data['os_name']).create()
        with Session(self.browser) as session:
            make_arch(session, name=test_data['old_name'])
            self.assertIsNotNone(
                self.architecture.search(test_data['old_name']))
            self.architecture.update(test_data['old_name'],
                                     test_data['new_name'],
                                     new_os_names=[test_data['os_name']])
            self.assertIsNotNone(
                self.architecture.search(test_data['new_name']))
Esempio n. 27
0
    def test_positive_update_name_and_os(self):
        """@Test: Update Architecture with new name and OS

        @Feature: Architecture - Update

        @Assert: Architecture is updated
        """
        old_name = gen_string('alpha')
        with Session(self.browser) as session:
            make_arch(session, name=old_name)
            self.assertIsNotNone(self.architecture.search(old_name))
            for new_name in generate_strings_list():
                with self.subTest(new_name):
                    os_name = gen_string('alpha')
                    entities.OperatingSystem(name=os_name).create()
                    self.architecture.update(
                        old_name, new_name, new_os_names=[os_name])
                    self.assertIsNotNone(self.architecture.search(new_name))
                    old_name = new_name  # for next iteration
Esempio n. 28
0
    def test_positive_create_with_os(self):
        """Create a new Architecture with OS

        :id: 6c386230-2285-4f41-a3a5-6a17ae844f80

        :expectedresults: Architecture is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for test_data in valid_arch_os_names():
                with self.subTest(test_data):
                    entities.OperatingSystem(
                        name=test_data['os_name']).create()
                    make_arch(session,
                              name=test_data['name'],
                              os_names=[test_data['os_name']])
                    self.assertIsNotNone(
                        self.architecture.search(test_data['name']))
Esempio n. 29
0
    def test_positive_update_name_and_os(self):
        """Update Architecture with new name and OS

        @Feature: Architecture - Update

        @Assert: Architecture is updated
        """
        old_name = gen_string('alpha')
        with Session(self.browser) as session:
            make_arch(session, name=old_name)
            self.assertIsNotNone(self.architecture.search(old_name))
            for new_name in generate_strings_list():
                with self.subTest(new_name):
                    os_name = gen_string('alpha')
                    entities.OperatingSystem(name=os_name).create()
                    self.architecture.update(
                        old_name, new_name, new_os_names=[os_name])
                    self.assertIsNotNone(self.architecture.search(new_name))
                    old_name = new_name  # for next iteration
Esempio n. 30
0
    def test_positive_create_with_os(self):
        """Create a new Architecture with OS

        :id: 6c386230-2285-4f41-a3a5-6a17ae844f80

        :expectedresults: Architecture is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for test_data in valid_arch_os_names():
                with self.subTest(test_data):
                    entities.OperatingSystem(
                        name=test_data['os_name']).create()
                    make_arch(
                        session,
                        name=test_data['name'],
                        os_names=[test_data['os_name']]
                    )
                    self.assertIsNotNone(
                        self.architecture.search(test_data['name']))
Esempio n. 31
0
    def test_positive_update_name_and_os(self):
        """Update Architecture with new name and OS

        :id: cbb2e8fc-1dde-42c4-aab0-479bd16fb5ec

        :expectedresults: Architecture is updated

        :CaseImportance: Critical
        """
        old_name = gen_string('alpha')
        os_name = gen_string('alpha')
        entities.OperatingSystem(name=os_name).create()
        with Session(self) as session:
            make_arch(session, name=old_name)
            self.assertIsNotNone(self.architecture.search(old_name))
            for new_name in generate_strings_list():
                with self.subTest(new_name):
                    self.architecture.update(
                        old_name, new_name, new_os_names=[os_name])
                    self.assertIsNotNone(self.architecture.search(new_name))
                    old_name = new_name  # for next iteration
Esempio n. 32
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']))
Esempio n. 33
0
    def test_update_arch(self, test_data):
        """@Test: Update Architecture with new name and OS

        @Feature: Architecture - Update

        @Assert: Architecture is updated

        """

        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['old_name'])
            self.assertIsNotNone(self.architecture.search
                                 (test_data['old_name']))
            self.architecture.update(test_data['old_name'],
                                     test_data['new_name'],
                                     new_os_names=[test_data['os_name']])
            self.assertIsNotNone(self.architecture.search
                                 (test_data['new_name']))
Esempio n. 34
0
    def test_positive_update_name_and_os(self):
        """Update Architecture with new name and OS

        :id: cbb2e8fc-1dde-42c4-aab0-479bd16fb5ec

        :expectedresults: Architecture is updated

        :CaseImportance: Critical
        """
        old_name = gen_string('alpha')
        os_name = gen_string('alpha')
        entities.OperatingSystem(name=os_name).create()
        with Session(self) as session:
            make_arch(session, name=old_name)
            self.assertIsNotNone(self.architecture.search(old_name))
            for new_name in generate_strings_list():
                with self.subTest(new_name):
                    self.architecture.update(old_name,
                                             new_name,
                                             new_os_names=[os_name])
                    self.assertIsNotNone(self.architecture.search(new_name))
                    old_name = new_name  # for next iteration