Imported Debian patch 4.0.5-6~numeezy
This commit is contained in:
committed by
Mario Fetka
parent
c44de33144
commit
10dfc9587b
@@ -22,18 +22,11 @@ Test integration of DNS and realmdomains.
|
||||
2. realmdomains_mod should add a _kerberos TXT record in the DNS zone.
|
||||
"""
|
||||
|
||||
import six
|
||||
|
||||
from ipalib import api, errors
|
||||
from ipalib.util import normalize_zone
|
||||
from ipapython.dn import DN
|
||||
from ipapython.dnsutil import DNSName
|
||||
from ipatests.test_xmlrpc import objectclasses
|
||||
from ipatests.test_xmlrpc.xmlrpc_test import Declarative, fuzzy_digits
|
||||
import pytest
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
from xmlrpc_test import Declarative, fuzzy_digits
|
||||
|
||||
|
||||
cn = u'Realm Domains'
|
||||
@@ -50,8 +43,6 @@ dnszone_2_absolute = "%s." % dnszone_2
|
||||
dnszone_2_dn = DN(('idnsname', dnszone_2_absolute), api.env.container_dns,
|
||||
api.env.basedn)
|
||||
|
||||
self_server_ns = normalize_zone(api.env.host)
|
||||
self_server_ns_dnsname = DNSName(self_server_ns)
|
||||
|
||||
def assert_realmdomain_and_txt_record_present(response):
|
||||
zone = response['value']
|
||||
@@ -89,7 +80,6 @@ def assert_realmdomain_and_txt_record_not_present(response):
|
||||
return True
|
||||
|
||||
|
||||
@pytest.mark.tier1
|
||||
class test_dns_realmdomains_integration(Declarative):
|
||||
cleanup_commands = [
|
||||
('realmdomains_mod', [], {'associateddomain': [our_domain]}),
|
||||
@@ -102,7 +92,9 @@ class test_dns_realmdomains_integration(Declarative):
|
||||
'during dnszone_add',
|
||||
command=(
|
||||
'dnszone_add', [dnszone_1], {
|
||||
'idnssoamname': idnssoamname,
|
||||
'idnssoarname': idnssoarname,
|
||||
'ip_address': u'1.2.3.4',
|
||||
}
|
||||
),
|
||||
expected={
|
||||
@@ -112,8 +104,8 @@ class test_dns_realmdomains_integration(Declarative):
|
||||
'dn': dnszone_1_dn,
|
||||
'idnsname': [DNSName(dnszone_1_absolute)],
|
||||
'idnszoneactive': [u'TRUE'],
|
||||
'idnssoamname': [self_server_ns_dnsname],
|
||||
'nsrecord': lambda x: True,
|
||||
'idnssoamname': [DNSName(idnssoamname)],
|
||||
'nsrecord': [idnssoamname],
|
||||
'idnssoarname': [DNSName(idnssoarname)],
|
||||
'idnssoaserial': [fuzzy_digits],
|
||||
'idnssoarefresh': [fuzzy_digits],
|
||||
@@ -139,9 +131,11 @@ class test_dns_realmdomains_integration(Declarative):
|
||||
'during dnszone_add for forwarded zone',
|
||||
command=(
|
||||
'dnszone_add', [dnszone_2], {
|
||||
'idnssoamname': idnssoamname,
|
||||
'idnssoarname': idnssoarname,
|
||||
'idnsforwarders': u'1.2.3.4',
|
||||
'idnsforwardpolicy': u'only',
|
||||
'force': True,
|
||||
}
|
||||
),
|
||||
expected={
|
||||
@@ -160,10 +154,10 @@ class test_dns_realmdomains_integration(Declarative):
|
||||
'dn': dnszone_2_dn,
|
||||
'idnsname': [DNSName(dnszone_2_absolute)],
|
||||
'idnszoneactive': [u'TRUE'],
|
||||
'idnssoamname': [self_server_ns_dnsname],
|
||||
'idnssoamname': [DNSName(idnssoamname)],
|
||||
'idnsforwarders': [u'1.2.3.4'],
|
||||
'idnsforwardpolicy': [u'only'],
|
||||
'nsrecord': lambda x: True,
|
||||
'nsrecord': [idnssoamname],
|
||||
'idnssoarname': [DNSName(idnssoarname)],
|
||||
'idnssoaserial': [fuzzy_digits],
|
||||
'idnssoarefresh': [fuzzy_digits],
|
||||
|
||||
Reference in New Issue
Block a user