Пример #1
0
    def test_del_domain_and_refresh(self):
        """
        Delete domain and refresh
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        self.navigate_to_entity(ENTITY)

        # delete
        self.del_multivalued('associateddomain', realmdomain)
        self.facet_button_click('refresh')

        # check
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #2
0
    def test_del_domain_with_force_update(self):
        """
        Delete and force update
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        self.navigate_to_entity(ENTITY)

        # force delete
        self.del_multivalued('associateddomain', realmdomain)
        self.facet_button_click('save')
        self.dialog_button_click('force')
        self.wait_for_request()
        self.close_notifications()

        # check
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain not in domains

        # cleanup
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #3
0
    def test_del_domain_undo_all(self):
        """
        Undo all after deleting existing domain
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        # check that domain is present
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # delete and undo
        self.navigate_to_entity(ENTITY)
        self.del_multivalued('associateddomain', realmdomain)
        self.undo_all_multivalued('associateddomain')

        # check that domain is present
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #4
0
    def test_read(self):
        """
        Realm domains mod tests
        """
        self.init_app()
        self.navigate_to_entity(ENTITY)

        # add with force - skipping DNS check
        self._add_associateddomain(['itest.bar'], force=True)
        self.close_notifications()

        # delete
        self.del_realm_domain('itest.bar', 'force')
        self.wait_for_request()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add Realm Domain and Check DNS
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #5
0
    def test_del_domain_of_ipa_server_bug1035286(self):
        """
        Error should occur when:
        1) delete Domain of Ipa server
        2) select update
        3) select force update
        4) click "Cancel"
        """
        self.init_app()

        ipadomain = self.config.get('ipa_domain')

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        self.navigate_to_entity(ENTITY)

        self.del_multivalued('associateddomain', ipadomain)
        self.facet_button_click('save')
        self.dialog_button_click('force')
        self.wait_for_request()

        dialog = self.get_last_error_dialog()
        assert ("invalid 'realmdomain list': "
                "IPA server domain cannot be omitted" in dialog.text)
        self.dialog_button_click('cancel')
        self.facet_button_click('refresh')

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #6
0
    def test_read(self):
        """
        Realm domains mod tests
        """
        self.init_app()
        self.navigate_to_entity(ENTITY)

        # add with force - skipping DNS check
        self._add_associateddomain(['itest.bar'], force=True)
        self.close_notifications()

        # delete
        self.del_realm_domain('itest.bar', 'force')
        self.wait_for_request()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add Realm Domain and Check DNS
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #7
0
    def test_del_domain_and_refresh(self):
        """
        Delete domain and refresh
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        self.navigate_to_entity(ENTITY)

        # delete
        self.del_multivalued('associateddomain', realmdomain)
        self.facet_button_click('refresh')

        # check
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #8
0
    def test_del_domain_with_force_update(self):
        """
        Delete and force update
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        self.navigate_to_entity(ENTITY)

        # force delete
        self.del_multivalued('associateddomain', realmdomain)
        self.facet_button_click('save')
        self.dialog_button_click('force')
        self.wait_for_request()
        self.close_notifications()

        # check
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain not in domains

        # cleanup
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #9
0
    def test_dnszone_del_hooked_to_realmdomains_mod(self):
        """
        ipa dnszone-del also removes the entry from realmdomains list
        1) Navigate Identity >> DNS
        2) Add Dnszone (newdom.com)
        3) navigate Identity >> RealmDomain
        4) verify newly added domain (newdom.com) exists in realmdomain list
        7) Navigate Identity >> DNS
        8) Delete Dnszone(newdom.com)
        9) navigate Identity >> RealmDomain
        10) verify domain (newdom.com) is not exists in realmdomain list
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')

        # add DNS domain
        self.navigate_to_entity(ZONE_ENTITY)
        self.add_record(ZONE_ENTITY, ZONE_DATA)
        self.assert_record(ZONE_PKEY)

        self.navigate_to_entity(ENTITY)
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)

        self.navigate_to_entity(ENTITY)
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain not in domains
Пример #10
0
    def test_del_domain_undo_all(self):
        """
        Undo all after deleting existing domain
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        # check that domain is present
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # delete and undo
        self.navigate_to_entity(ENTITY)
        self.del_multivalued('associateddomain', realmdomain)
        self.undo_all_multivalued('associateddomain')

        # check that domain is present
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #11
0
    def test_dnszone_del_hooked_to_realmdomains_mod(self):
        """
        ipa dnszone-del also removes the entry from realmdomains list
        1) Navigate Identity >> DNS
        2) Add Dnszone (newdom.com)
        3) navigate Identity >> RealmDomain
        4) verify newly added domain (newdom.com) exists in realmdomain list
        7) Navigate Identity >> DNS
        8) Delete Dnszone(newdom.com)
        9) navigate Identity >> RealmDomain
        10) verify domain (newdom.com) is not exists in realmdomain list
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')

        # add DNS domain
        self.navigate_to_entity(ZONE_ENTITY)
        self.add_record(ZONE_ENTITY, ZONE_DATA)
        self.assert_record(ZONE_PKEY)

        self.navigate_to_entity(ENTITY)
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)

        self.navigate_to_entity(ENTITY)
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain not in domains
Пример #12
0
    def test_del_domain_of_ipa_server_bug1035286(self):
        """
        Error should occur when:
        1) delete Domain of Ipa server
        2) select update
        3) select force update
        4) click "Cancel"
        """
        self.init_app()

        ipadomain = self.config.get('ipa_domain')

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        self.navigate_to_entity(ENTITY)

        self.del_multivalued('associateddomain', ipadomain)
        self.facet_button_click('save')
        self.dialog_button_click('force')
        self.wait_for_request()

        dialog = self.get_last_error_dialog()
        assert ("invalid 'realmdomain list': "
                "IPA server domain cannot be omitted" in dialog.text)
        self.dialog_button_click('cancel')
        self.facet_button_click('refresh')

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #13
0
    def test_dnszone_add_hooked_to_realmdomains_mod(self):
        """
        DNSZone is hooked to realmdomains:
        1) Navigate Identity >> DNS
        2) Add Dnszone (newdom.com)
        3) go to DNS Resource Records(DNS Zone >> newdom.com)
        4) verify TXT record is exists
        5) navigate Identity >> RealmDomain
        6) verify newly added domain (newdom.com) exists in realmdomain list
        7) Delete domain (newdom.com) from realmdomain list
        8) go to DNS Resource Records(DNS Zone >> newdom.com)
        9) verify TXT record is not exists
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        realm = self.config.get('ipa_realm')

        # add DNS domain
        self.navigate_to_entity(ZONE_ENTITY)
        self.add_record(ZONE_ENTITY, ZONE_DATA)
        self.assert_record(ZONE_PKEY)

        self.navigate_to_record(ZONE_PKEY)
        self.assert_record('_kerberos')
        self.assert_record_value('TXT', '_kerberos', 'type')
        self.assert_record_value(realm, '_kerberos', 'data')

        self.navigate_to_entity(ENTITY)
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        self.del_multivalued('associateddomain', realmdomain)
        self.facet_button_click('save')
        self.dialog_button_click('ok')
        self.wait_for_request()

        self.navigate_to_entity(ZONE_ENTITY)
        self.assert_record(ZONE_PKEY)

        self.navigate_to_record(ZONE_PKEY)
        self.facet_button_click('refresh')
        self.assert_record('_kerberos', negative=True)

        # cleanup
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #14
0
    def test_dnszone_add_hooked_to_realmdomains_mod(self):
        """
        DNSZone is hooked to realmdomains:
        1) Navigate Identity >> DNS
        2) Add Dnszone (newdom.com)
        3) go to DNS Resource Records(DNS Zone >> newdom.com)
        4) verify TXT record is exists
        5) navigate Identity >> RealmDomain
        6) verify newly added domain (newdom.com) exists in realmdomain list
        7) Delete domain (newdom.com) from realmdomain list
        8) go to DNS Resource Records(DNS Zone >> newdom.com)
        9) verify TXT record is not exists
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        realm = self.config.get('ipa_realm')

        # add DNS domain
        self.navigate_to_entity(ZONE_ENTITY)
        self.add_record(ZONE_ENTITY, ZONE_DATA)
        self.assert_record(ZONE_PKEY)

        self.navigate_to_record(ZONE_PKEY)
        self.assert_record('_kerberos')
        self.assert_record_value('TXT', '_kerberos', 'type')
        self.assert_record_value(realm, '_kerberos', 'data')

        self.navigate_to_entity(ENTITY)
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        self.del_multivalued('associateddomain', realmdomain)
        self.facet_button_click('save')
        self.dialog_button_click('ok')
        self.wait_for_request()

        self.navigate_to_entity(ZONE_ENTITY)
        self.assert_record(ZONE_PKEY)

        self.navigate_to_record(ZONE_PKEY)
        self.facet_button_click('refresh')
        self.assert_record('_kerberos', negative=True)

        # cleanup
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #15
0
    def test_add_non_dns_configured_domain_negative(self):
        """
        Domain shouldn't be added after:
        1) add DNS non configured domain
        2) click update
        3) check DNS
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')

        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        dialog = self.get_last_error_dialog()
        assert ("invalid 'domain': DNS zone for each realmdomain must contain "
                "SOA or NS records. "
                "No records found for: " + realmdomain in dialog.text)
Пример #16
0
    def test_add_non_dns_configured_domain_negative(self):
        """
        Domain shouldn't be added after:
        1) add DNS non configured domain
        2) click update
        3) check DNS
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')

        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        dialog = self.get_last_error_dialog()
        assert ("invalid 'domain': DNS zone for each realmdomain must contain "
                "SOA or NS records. "
                "No records found for: " + realmdomain
                in dialog.text)
Пример #17
0
    def test_add_non_dns_configured_domain_positive(self):
        """
        Domain should be added fter:
        1) add DNS non configured domain
        2) click update
        3) click force
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')

        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain], force=True)

        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #18
0
    def test_add_non_dns_configured_domain_positive(self):
        """
        Domain should be added fter:
        1) add DNS non configured domain
        2) click update
        3) click force
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')

        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain], force=True)

        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #19
0
    def test_add_duplicate_domain(self):
        """
        Add duplicate domain
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        self.navigate_to_entity(ENTITY)

        # add two (same) domains with force - skipping DNS check
        self._add_associateddomain([realmdomain, realmdomain], force=True)

        # check
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'force')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #20
0
    def test_add_domain_and_update(self):
        """
        Add domain and update
        """
        self.init_app()
        self.navigate_to_entity(ENTITY)

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add Realm Domain and Check DNS
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        # check
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #21
0
    def test_add_duplicate_domain(self):
        """
        Add duplicate domain
        """
        self.init_app()

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        self.navigate_to_entity(ENTITY)

        # add two (same) domains with force - skipping DNS check
        self._add_associateddomain([realmdomain, realmdomain], force=True)

        # check
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'force')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #22
0
    def test_add_domain_and_update(self):
        """
        Add domain and update
        """
        self.init_app()
        self.navigate_to_entity(ENTITY)

        realmdomain = ZONE_PKEY.strip('.')
        self.prepare_dns_zone(realmdomain)

        # add Realm Domain and Check DNS
        self.navigate_to_entity(ENTITY)
        self._add_associateddomain([realmdomain])

        # check
        domains = self.get_multivalued_value('associateddomain')
        assert realmdomain in domains

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #23
0
    def test_read(self):
        """
        Realm domains mod tests
        """
        self.init_app()
        self.navigate_to_entity(ENTITY)

        # add with force - skipping DNS check
        self.add_multivalued('associateddomain', 'itest.bar')
        self.facet_button_click('save')
        self.dialog_button_click('force')
        self.wait_for_request()
        self.close_notifications()

        # delete
        self.del_realm_domain('itest.bar', 'force')
        self.wait_for_request()

        # Try adding and deleting with "Check DNS" (in html 'ok' button)

        # DNS check expects that the added domain will have DNS record:
        #    TXT _kerberos.$domain "$REALM"
        # When a new domain is added using dnszone-add it automatically adds
        # this TXT record and adds a realm domain. So in order to test without
        # external DNS we must get into state where realm domain is not added
        # (in order to add it) but DNS domain with the TXT record
        # exists.

        # add DNS domain
        self.navigate_to_entity(ZONE_ENTITY)
        self.add_record(ZONE_ENTITY, ZONE_DATA)

        realmdomain = ZONE_PKEY.strip('.')
        realm = self.config.get('ipa_realm')

        # remove the added domain from Realm Domain
        self.navigate_to_entity(ENTITY)
        self.del_realm_domain(realmdomain, 'ok')
        self.close_notifications()

        # re-add _TXT kerberos.$domain "$REALM"
        self.navigate_to_entity(ZONE_ENTITY)
        self.navigate_to_record(ZONE_PKEY)

        DNS_RECORD_ADD_DATA = {
            'pkey':
            '_kerberos',
            'add': [
                ('textbox', 'idnsname', '_kerberos'),
                ('selectbox', 'record_type', 'txtrecord'),
                ('textbox', 'txt_part_data', realm),
            ]
        }
        self.add_record(ZONE_ENTITY,
                        DNS_RECORD_ADD_DATA,
                        facet=ZONE_DEFAULT_FACET,
                        navigate=False)

        # add Realm Domain and Check DNS
        self.navigate_to_entity(ENTITY)
        self.add_multivalued('associateddomain', realmdomain)
        self.facet_button_click('save')
        self.dialog_button_click('ok')
        self.wait_for_request()

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)
Пример #24
0
    def test_read(self):
        """
        Realm domains mod tests
        """
        self.init_app()
        self.navigate_to_entity(ENTITY)

        # add with force - skipping DNS check
        self.add_multivalued('associateddomain', 'itest.bar')
        self.facet_button_click('save')
        self.dialog_button_click('force')
        self.wait_for_request()
        self.close_notifications()

        # delete
        self.del_realm_domain('itest.bar', 'force')
        self.wait_for_request()

        # Try adding and deleting with "Check DNS" (in html 'ok' button)

        # DNS check expects that the added domain will have DNS record:
        #    TXT _kerberos.$domain "$REALM"
        # When a new domain is added using dnszone-add it automatically adds
        # this TXT record and adds a realm domain. So in order to test without
        # external DNS we must get into state where realm domain is not added
        # (in order to add it) but DNS domain with the TXT record
        # exists.

        # add DNS domain
        self.navigate_to_entity(ZONE_ENTITY)
        self.add_record(ZONE_ENTITY, ZONE_DATA)

        realmdomain = ZONE_PKEY.strip('.')
        realm = self.config.get('ipa_realm')

        # remove the added domain from Realm Domain
        self.navigate_to_entity(ENTITY)
        self.del_realm_domain(realmdomain, 'ok')
        self.close_notifications()

        # re-add _TXT kerberos.$domain "$REALM"
        self.navigate_to_entity(ZONE_ENTITY)
        self.navigate_to_record(ZONE_PKEY)

        DNS_RECORD_ADD_DATA = {
            'pkey': '_kerberos',
            'add': [
                ('textbox', 'idnsname', '_kerberos'),
                ('selectbox', 'record_type', 'txtrecord'),
                ('textbox', 'txt_part_data', realm),
            ]
        }
        self.add_record(ZONE_ENTITY, DNS_RECORD_ADD_DATA,
                        facet=ZONE_DEFAULT_FACET, navigate=False)

        # add Realm Domain and Check DNS
        self.navigate_to_entity(ENTITY)
        self.add_multivalued('associateddomain', realmdomain)
        self.facet_button_click('save')
        self.dialog_button_click('ok')
        self.wait_for_request()

        # cleanup
        self.del_realm_domain(realmdomain, 'ok')
        self.navigate_to_entity(ZONE_ENTITY)
        self.delete_record(ZONE_PKEY)