Exemplo n.º 1
0
    def test_key_associate_4(self):
        """@test: Create gpg key with valid name and valid gpg key
        then associate it with custom product using Repo discovery method

        @feature: GPG Keys

        @assert: gpg key is associated with product as well as with
        the repositories

        @BZ: 1085035

        """
        name = get_random_gpgkey_name()
        with Session(self.browser) as session:
            make_gpgkey(
                session,
                key_content=self.key_content,
                name=name,
                org=self.organization.name,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            session.nav.go_to_products()
            self.repository.discover_repo(
                REPO_DISCOVERY_URL,
                ['fakerepo01/'],
                gpg_key=name,
                new_product=True,
                product=gen_string('alpha', 8),
            )
            for product in (True, False):
                self.assertIsNotNone(
                    self.gpgkey.assert_product_repo(name, product=product)
                )
Exemplo n.º 2
0
    def test_negative_update_name_for_imported_content(self):
        """Create gpg key with valid name and valid gpg key via file
        import then fail to update its name

        :id: 969aad7c-ba4c-4d1d-84a5-c9e1b9130867

        :expectedresults: gpg key is not updated

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        with Session(self) as session:
            make_gpgkey(
                session,
                key_path=self.key_path,
                name=name,
                org=self.organization.name,
                upload_key=True,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            for new_name in invalid_names_list():
                with self.subTest(new_name):
                    self.gpgkey.update(name, new_name)
                    self.assertIsNotNone(self.gpgkey.wait_until_element(
                        common_locators['alert.error_sub_form']
                    ))
                    self.assertIsNone(self.gpgkey.search(new_name))
Exemplo n.º 3
0
    def test_negative_update_1(self):
        """@test: Create gpg key with valid name and valid gpg key via file
        import then fail to update its name

        @feature: GPG Keys

        @assert: gpg key is not updated

        """
        name = gen_string('alpha', 6)
        with Session(self.browser) as session:
            make_gpgkey(
                session,
                key_path=self.key_path,
                name=name,
                org=self.organization.name,
                upload_key=True,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            for new_name in generate_strings_list(
                    length=300, remove_str='numeric', bug_id=1184480):
                with self.subTest(new_name):
                    self.gpgkey.update(name, new_name)
                    self.assertIsNotNone(
                        self.gpgkey.wait_until_element(
                            common_locators['alert.error'])
                    )
                    self.assertIsNone(self.gpgkey.search(new_name))
Exemplo n.º 4
0
    def test_negative_create_4(self):
        """@test: Create gpg key with invalid name and valid gpg key via
        file import

        @feature: GPG Keys

        @assert: gpg key is not created

        """
        with Session(self.browser) as session:
            for name in generate_strings_list(
                    length=300, remove_str='numeric', bug_id=1184480):
                with self.subTest(name):
                    make_gpgkey(
                        session,
                        key_path=self.key_path,
                        name=name,
                        org=self.organization.name,
                        upload_key=True,
                    )
                    self.assertIsNotNone(
                        self.gpgkey.wait_until_element(
                            common_locators['alert.error'])
                    )
                    self.assertIsNone(self.gpgkey.search(name))
Exemplo n.º 5
0
    def test_positive_update_4(self):
        """@test: Create gpg key with valid name and valid gpg key text via
        cut and paste/string then update its gpg key text

        @feature: GPG Keys

        @assert: gpg key is updated

        @bz: 1204602

        """
        name = gen_string('alpha', 6)
        new_key_path = get_data_file(VALID_GPG_KEY_BETA_FILE)
        with Session(self.browser) as session:
            make_gpgkey(
                session,
                key_content=self.key_content,
                name=name,
                org=self.organization.name,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_key=new_key_path)
            self.assertIsNotNone(self.gpgkey.wait_until_element(
                common_locators['alert.success']
            ))
Exemplo n.º 6
0
    def test_positive_update_name_for_imported_content(self):
        """Create gpg key with valid name and valid gpg key via file
        import then update its name

        :id: 85e211fb-bcb4-4895-af3e-febb189be5c0

        :expectedresults: gpg key is updated

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        new_name = gen_string('alpha')
        with Session(self) as session:
            make_gpgkey(
                session,
                key_path=self.key_path,
                name=name,
                org=self.organization.name,
                upload_key=True,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_name)
            self.assertIsNotNone(self.gpgkey.wait_until_element(
                common_locators['alert.success_sub_form']))
            self.assertIsNotNone(self.gpgkey.search(new_name))
Exemplo n.º 7
0
    def test_positive_search_scoped(self):
        """Search for gpgkey by organization id parameter

        :id: e1e04f68-5d4f-43f6-a9c1-b9f566fcbc92

        :customerscenario: true

        :expectedresults: correct gpg key is found

        :BZ: 1259374

        :CaseImportance: High
        """
        name = gen_string('alpha')
        org = entities.Organization().create()
        with Session(self) as session:
            make_gpgkey(
                session,
                key_path=self.key_path,
                name=name,
                org=org.name,
                upload_key=True,
            )
            self.assertIsNotNone(
                self.gpgkey.search(
                    name, _raw_query='organization_id = {}'.format(org.id))
            )
Exemplo n.º 8
0
    def test_negative_create_without_content(self):
        """Create gpg key with valid name and no gpg key

        @id: 20167716-48c5-4f28-afe2-07fa22aeb240

        @assert: gpg key is not created
        """
        name = gen_string("alphanumeric")
        with Session(self.browser) as session:
            with self.assertRaises(UIError):
                make_gpgkey(session, name=name, org=self.organization.name)
            self.assertIsNone(self.gpgkey.search(name))
Exemplo n.º 9
0
    def test_positive_create_via_import(self):
        """Create gpg key with valid name and valid gpg key via file
        import

        @id: 3a6f3a58-da2d-4fd7-9ceb-c95f7c9dce7c

        @assert: gpg key is created
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_gpgkey(session, key_path=self.key_path, name=name, org=self.organization.name, upload_key=True)
                    self.assertIsNotNone(self.gpgkey.search(name))
Exemplo n.º 10
0
    def test_negative_create_3(self):
        """@test: Create gpg key with valid name and no gpg key

        @feature: GPG Keys

        @assert: gpg key is not created

        """
        name = gen_string('alphanumeric')
        with Session(self.browser) as session:
            with self.assertRaises(UIError):
                make_gpgkey(session, name=name, org=self.organization.name)
            self.assertIsNone(self.gpgkey.search(name))
Exemplo n.º 11
0
    def test_positive_create_via_paste(self):
        """Create gpg key with valid name and valid gpg key text via
        cut and paste/string

        @id: 8b5d112c-b52c-458d-bddd-56bd26afdeb1

        @assert: gpg key is created
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_gpgkey(session, key_content=self.key_content, name=name, org=self.organization.name)
                    self.assertIsNotNone(self.gpgkey.search(name))
Exemplo n.º 12
0
    def test_negative_create_via_import_and_invalid_name(self):
        """Create gpg key with invalid name and valid gpg key via
        file import

        @id: bc5f96e6-e997-4995-ad04-614e66480b7f

        @assert: gpg key is not created
        """
        with Session(self.browser) as session:
            for name in invalid_names_list():
                with self.subTest(name):
                    make_gpgkey(session, key_path=self.key_path, name=name, org=self.organization.name, upload_key=True)
                    self.assertIsNotNone(self.gpgkey.wait_until_element(common_locators["alert.error"]))
                    self.assertIsNone(self.gpgkey.search(name))
Exemplo n.º 13
0
    def test_negative_create_via_paste_and_invalid_name(self):
        """Create gpg key with invalid name and valid gpg key text via
        cut and paste/string

        @id: 652857de-c522-4c68-a758-13d0b37cc62a

        @assert: gpg key is not created
        """
        with Session(self.browser) as session:
            for name in invalid_names_list():
                with self.subTest(name):
                    make_gpgkey(session, key_content=self.key_content, name=name, org=self.organization.name)
                    self.assertIsNotNone(self.gpgkey.wait_until_element(common_locators["alert.error"]))
                    self.assertIsNone(self.gpgkey.search(name))
Exemplo n.º 14
0
    def test_positive_delete_for_imported_content(self):
        """Create gpg key with valid name and valid gpg key via file
        import then delete it

        @id: 495547c0-8e38-49cc-9be4-3f24a20d3af7

        @assert: gpg key is deleted
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_gpgkey(session, key_path=self.key_path, name=name, org=self.organization.name, upload_key=True)
                    self.assertIsNotNone(self.gpgkey.search(name))
                    self.gpgkey.delete(name)
Exemplo n.º 15
0
    def test_positive_delete_for_pasted_content(self):
        """Create gpg key with valid name and valid gpg key text via
        cut and paste/string then delete it

        @id: 77c97202-a877-4647-b7e2-3a9b68945fc4

        @assert: gpg key is deleted
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_gpgkey(session, key_content=self.key_content, name=name, org=self.organization.name)
                    self.assertIsNotNone(self.gpgkey.search(name))
                    self.gpgkey.delete(name)
Exemplo n.º 16
0
    def test_negative_create_via_import_and_same_name(self):
        """Create gpg key with valid name and valid gpg key via
        file import then try to create new one with same name

        @id: d5e28e8a-e0ef-4c74-a18b-e2646a2cdba5

        @assert: gpg key is not created
        """
        name = gen_string("alphanumeric")
        kwargs = {"key_path": self.key_path, "name": name, "org": self.organization.name, "upload_key": True}
        with Session(self.browser) as session:
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(self.gpgkey.search(name))
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(self.gpgkey.wait_until_element(common_locators["alert.error"]))
Exemplo n.º 17
0
    def test_positive_update_name_for_imported_content(self):
        """Create gpg key with valid name and valid gpg key via file
        import then update its name

        @id: 85e211fb-bcb4-4895-af3e-febb189be5c0

        @assert: gpg key is updated
        """
        name = gen_string("alpha")
        new_name = gen_string("alpha")
        with Session(self.browser) as session:
            make_gpgkey(session, key_path=self.key_path, name=name, org=self.organization.name, upload_key=True)
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_name)
            self.assertIsNotNone(self.gpgkey.wait_until_element(common_locators["alert.success_sub_form"]))
Exemplo n.º 18
0
    def test_negative_create_via_paste_and_same_name(self):
        """Create gpg key with valid name and valid gpg key text via
        cut and paste/string import then try to create new one with same name

        @id: c6b256a5-6b9b-4927-a6c6-048ba36d2834

        @assert: gpg key is not created
        """
        name = gen_string("alphanumeric")
        kwargs = {"key_content": self.key_content, "name": name, "org": self.organization.name}
        with Session(self.browser) as session:
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(self.gpgkey.search(name))
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(self.gpgkey.wait_until_element(common_locators["alert.error"]))
Exemplo n.º 19
0
    def test_positive_update_file_for_imported_content(self):
        """Create gpg key with valid name and valid gpg key via file
        import then update its gpg key file

        @id: 9f74b337-3ea5-48a1-af6e-d72ab41c2348

        @assert: gpg key is updated
        """
        name = gen_string("alpha")
        new_key_path = get_data_file(VALID_GPG_KEY_BETA_FILE)
        with Session(self.browser) as session:
            make_gpgkey(session, key_path=self.key_path, name=name, org=self.organization.name, upload_key=True)
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_key=new_key_path)
            self.assertIsNotNone(self.gpgkey.wait_until_element(common_locators["alert.success_sub_form"]))
Exemplo n.º 20
0
    def test_positive_update_name_for_pasted_content(self):
        """Create gpg key with valid name and valid gpg key text via
        cut and paste/string then update its name

        @id: 4336b539-15fd-4a40-bb98-0b0248f8abd8

        @assert: gpg key is updated
        """
        name = gen_string("alpha")
        new_name = gen_string("alpha")
        with Session(self.browser) as session:
            make_gpgkey(session, key_content=self.key_content, name=name, org=self.organization.name)
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_name)
            self.assertIsNotNone(self.gpgkey.wait_until_element(common_locators["alert.success_sub_form"]))
Exemplo n.º 21
0
    def test_positive_update_file_for_pasted_content(self):
        """Create gpg key with valid name and valid gpg key text via
        cut and paste/string then update its gpg key text

        @id: 07902ef6-a918-433a-9dad-d5376c3dd001

        @assert: gpg key is updated
        """
        name = gen_string("alpha")
        new_key_path = get_data_file(VALID_GPG_KEY_BETA_FILE)
        with Session(self.browser) as session:
            make_gpgkey(session, key_content=self.key_content, name=name, org=self.organization.name)
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_key=new_key_path)
            self.assertIsNotNone(self.gpgkey.wait_until_element(common_locators["alert.success_sub_form"]))
Exemplo n.º 22
0
    def test_negative_create_without_content(self):
        """Create gpg key with valid name and no gpg key

        :id: 20167716-48c5-4f28-afe2-07fa22aeb240

        :expectedresults: gpg key is not created

        :CaseImportance: Critical
        """
        name = gen_string('alphanumeric')
        with Session(self) as session:
            make_gpgkey(session, name=name, org=self.organization.name)
            self.assertIsNotNone(
                self.gpgkey.wait_until_element(common_locators['alert.error'])
            )
            self.assertIsNone(self.gpgkey.search(name))
Exemplo n.º 23
0
    def test_positive_create_2(self):
        """@test: Create gpg key with valid name and valid gpg key text via
        cut and paste/string

        @feature: GPG Keys

        @assert: gpg key is created

        """
        with Session(self.browser) as session:
            for name in generate_strings_list(
                    remove_str='numeric', bug_id=1184480):
                with self.subTest(name):
                    make_gpgkey(
                        session,
                        key_content=self.key_content,
                        name=name,
                        org=self.organization.name,
                    )
                    self.assertIsNotNone(self.gpgkey.search(name))
Exemplo n.º 24
0
    def test_positive_create_via_paste(self):
        """Create gpg key with valid name and valid gpg key text via
        cut and paste/string

        :id: 8b5d112c-b52c-458d-bddd-56bd26afdeb1

        :expectedresults: gpg key is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_gpgkey(
                        session,
                        key_content=self.key_content,
                        name=name,
                        org=self.organization.name,
                    )
                    self.assertIsNotNone(self.gpgkey.search(name))
Exemplo n.º 25
0
    def test_positive_create_1(self):
        """@test: Create gpg key with valid name and valid gpg key
        via file import

        @feature: GPG Keys

        @assert: gpg key is created

        """
        with Session(self.browser) as session:
            for name in generate_strings_list(
                    remove_str='numeric', bug_id=1184480):
                with self.subTest(name):
                    make_gpgkey(
                        session,
                        key_path=self.key_path,
                        name=name,
                        org=self.organization.name,
                        upload_key=True,
                        )
                    self.assertIsNotNone(self.gpgkey.search(name))
Exemplo n.º 26
0
    def test_negative_create_2(self):
        """@test: Create gpg key with valid name and valid gpg key text via
        cut and paste/string import then try to create new one with same name

        @feature: GPG Keys

        @assert: gpg key is not created

        """
        name = gen_string('alphanumeric')
        kwargs = {
            'key_content': self.key_content,
            'name': name,
            'org': self.organization.name,
        }
        with Session(self.browser) as session:
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(self.gpgkey.search(name))
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(
                self.gpgkey.wait_until_element(common_locators['alert.error'])
            )
Exemplo n.º 27
0
    def test_positive_update_3(self):
        """@test: Create gpg key with valid name and valid gpg key text via
        cut and paste/string then update its name

        @feature: GPG Keys

        @assert: gpg key is updated

        """
        name = gen_string('alpha', 6)
        new_name = gen_string('alpha', 6)
        with Session(self.browser) as session:
            make_gpgkey(
                session,
                key_content=self.key_content,
                name=name,
                org=self.organization.name,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_name)
            self.assertIsNotNone(self.gpgkey.wait_until_element(
                common_locators['alert.success']
            ))
Exemplo n.º 28
0
    def test_negative_create_via_import_and_same_name(self):
        """Create gpg key with valid name and valid gpg key via file import
        then try to create new one with same name and same content

        :id: d5e28e8a-e0ef-4c74-a18b-e2646a2cdba5

        :expectedresults: gpg key is not created

        :CaseImportance: Critical
        """
        name = gen_string('alphanumeric')
        kwargs = {
            'key_path': self.key_path,
            'name': name,
            'org': self.organization.name,
            'upload_key': True,
        }
        with Session(self) as session:
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(self.gpgkey.search(name))
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(
                self.gpgkey.wait_until_element(common_locators['alert.error']))
Exemplo n.º 29
0
    def test_positive_add_product_using_repo_discovery(self):
        """Create gpg key with valid name and valid gpg key
        then associate it with custom product using Repo discovery method

        @id: 7490a5a6-8575-45eb-addc-298ed3b62649

        @assert: gpg key is associated with product as well as with
        the repositories

        @BZ: 1210180

        @CaseLevel: Integration
        """
        name = get_random_gpgkey_name()
        with Session(self.browser) as session:
            make_gpgkey(session, key_content=self.key_content, name=name, org=self.organization.name)
            self.assertIsNotNone(self.gpgkey.search(name))
            session.nav.go_to_products()
            self.repository.discover_repo(
                REPO_DISCOVERY_URL, ["fakerepo01/"], gpg_key=name, new_product=True, product=gen_string("alpha")
            )
            for product in (True, False):
                self.assertIsNotNone(self.gpgkey.assert_product_repo(name, product=product))
Exemplo n.º 30
0
    def test_positive_add_product_using_repo_discovery(self):
        """Create gpg key with valid name and valid gpg key
        then associate it with custom product using Repo discovery method

        :id: 7490a5a6-8575-45eb-addc-298ed3b62649

        :expectedresults: gpg key is associated with product as well as with
            the repositories

        :BZ: 1210180, 1461804

        :CaseLevel: Integration
        """
        name = get_random_gpgkey_name()
        product_name = gen_string('alpha')
        with Session(self) as session:
            make_gpgkey(
                session,
                key_content=self.key_content,
                name=name,
                org=self.organization.name,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            session.nav.go_to_products()
            self.repository.discover_repo(
                REPO_DISCOVERY_URL,
                ['fakerepo01/'],
                gpg_key=name,
                new_product=True,
                product=product_name,
            )
            self.assertIsNotNone(
                self.gpgkey.get_product_repo(name, product_name))
            self.assertIsNotNone(
                self.gpgkey.get_product_repo(name,
                                             'fakerepo01',
                                             entity_type='Repository'))
Exemplo n.º 31
0
    def test_negative_create_via_import_and_invalid_name(self):
        """Create gpg key with invalid name and valid gpg key via file import

        :id: bc5f96e6-e997-4995-ad04-614e66480b7f

        :expectedresults: gpg key is not created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in invalid_names_list():
                with self.subTest(name):
                    make_gpgkey(
                        session,
                        key_path=self.key_path,
                        name=name,
                        org=self.organization.name,
                        upload_key=True,
                    )
                    self.assertIsNotNone(
                        self.gpgkey.wait_until_element(
                            common_locators['alert.error'])
                    )
                    self.assertIsNone(self.gpgkey.search(name))
Exemplo n.º 32
0
    def test_negative_create_via_paste_and_invalid_name(self):
        """Create gpg key with invalid name and valid gpg key text via cut and
        paste/string

        :id: 652857de-c522-4c68-a758-13d0b37cc62a

        :expectedresults: gpg key is not created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in invalid_names_list():
                with self.subTest(name):
                    make_gpgkey(
                        session,
                        key_content=self.key_content,
                        name=name,
                        org=self.organization.name,
                    )
                    self.assertIsNotNone(
                        self.gpgkey.wait_until_element(
                            common_locators['alert.error'])
                    )
                    self.assertIsNone(self.gpgkey.search(name))
Exemplo n.º 33
0
    def test_positive_update_name_for_pasted_content(self):
        """Create gpg key with valid name and valid gpg key text via
        cut and paste/string then update its name

        :id: 4336b539-15fd-4a40-bb98-0b0248f8abd8

        :expectedresults: gpg key is updated

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        new_name = gen_string('alpha')
        with Session(self) as session:
            make_gpgkey(
                session,
                key_content=self.key_content,
                name=name,
                org=self.organization.name,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_name)
            self.assertIsNotNone(self.gpgkey.wait_until_element(
                common_locators['alert.success_sub_form']))
            self.assertIsNotNone(self.gpgkey.search(new_name))
Exemplo n.º 34
0
    def test_positive_update_name_for_pasted_content(self):
        """Create gpg key with valid name and valid gpg key text via
        cut and paste/string then update its name

        :id: 4336b539-15fd-4a40-bb98-0b0248f8abd8

        :expectedresults: gpg key is updated

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        new_name = gen_string('alpha')
        with Session(self) as session:
            make_gpgkey(
                session,
                key_content=self.key_content,
                name=name,
                org=self.organization.name,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_name)
            self.assertIsNotNone(self.gpgkey.wait_until_element(
                common_locators['alert.success_sub_form']))
            self.assertIsNotNone(self.gpgkey.search(new_name))
Exemplo n.º 35
0
    def test_positive_update_file_for_imported_content(self):
        """Create gpg key with valid name and valid gpg key via file
        import then update its gpg key file

        :id: 9f74b337-3ea5-48a1-af6e-d72ab41c2348

        :expectedresults: gpg key is updated

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        new_key_path = get_data_file(VALID_GPG_KEY_BETA_FILE)
        with Session(self) as session:
            make_gpgkey(
                session,
                key_path=self.key_path,
                name=name,
                org=self.organization.name,
                upload_key=True,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_key=new_key_path)
            self.assertIsNotNone(self.gpgkey.wait_until_element(
                common_locators['alert.success_sub_form']))
Exemplo n.º 36
0
    def test_negative_create_via_paste_and_invalid_name(self):
        """Create gpg key with invalid name and valid gpg key text via cut and
        paste/string

        :id: 652857de-c522-4c68-a758-13d0b37cc62a

        :expectedresults: gpg key is not created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in invalid_names_list():
                with self.subTest(name):
                    make_gpgkey(
                        session,
                        key_content=self.key_content,
                        name=name,
                        org=self.organization.name,
                    )
                    self.assertIsNotNone(
                        self.gpgkey.wait_until_element(
                            common_locators['alert.error'])
                    )
                    self.assertIsNone(self.gpgkey.search(name))
Exemplo n.º 37
0
    def test_negative_create_via_paste_and_same_name(self):
        """Create gpg key with valid name and valid gpg key text via cut and
        paste/string import then try to create new one with same name and same
        content

        :id: c6b256a5-6b9b-4927-a6c6-048ba36d2834

        :expectedresults: gpg key is not created

        :CaseImportance: Critical
        """
        name = gen_string('alphanumeric')
        kwargs = {
            'key_content': self.key_content,
            'name': name,
            'org': self.organization.name,
        }
        with Session(self) as session:
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(self.gpgkey.search(name))
            make_gpgkey(session, **kwargs)
            self.assertIsNotNone(
                self.gpgkey.wait_until_element(common_locators['alert.error'])
            )
Exemplo n.º 38
0
    def test_positive_update_file_for_pasted_content(self):
        """Create gpg key with valid name and valid gpg key text via
        cut and paste/string then update its gpg key text

        :id: 07902ef6-a918-433a-9dad-d5376c3dd001

        :expectedresults: gpg key is updated

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        new_key_path = get_data_file(VALID_GPG_KEY_BETA_FILE)
        with Session(self) as session:
            make_gpgkey(
                session,
                key_content=self.key_content,
                name=name,
                org=self.organization.name,
            )
            self.assertIsNotNone(self.gpgkey.search(name))
            self.gpgkey.update(name, new_key=new_key_path)
            self.assertIsNotNone(
                self.gpgkey.wait_until_element(
                    common_locators['alert.success_sub_form']))