summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2012-05-03 06:47:17 -0400
committerMartin Kosek <mkosek@redhat.com>2012-05-03 16:55:05 +0200
commit8fac99634f3be38951dd2ad32ea76f2b0d0ec1b5 (patch)
treecb733d7043cb6af8cf452a3984e12b190d9b9654
parent1267d5731d31c80e3b6d06397e23f7070d7eb508 (diff)
downloadfreeipa.git-8fac99634f3be38951dd2ad32ea76f2b0d0ec1b5.tar.gz
freeipa.git-8fac99634f3be38951dd2ad32ea76f2b0d0ec1b5.tar.xz
freeipa.git-8fac99634f3be38951dd2ad32ea76f2b0d0ec1b5.zip
Update hostname validator error messages in tests
A recent patch changed the error message from the hostname validator. Update the tests to reflect this change.
-rw-r--r--tests/test_xmlrpc/test_dns_plugin.py10
-rw-r--r--tests/test_xmlrpc/test_host_plugin.py2
-rw-r--r--tests/test_xmlrpc/test_netgroup_plugin.py3
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/test_xmlrpc/test_dns_plugin.py b/tests/test_xmlrpc/test_dns_plugin.py
index 786c4961..8aeaede5 100644
--- a/tests/test_xmlrpc/test_dns_plugin.py
+++ b/tests/test_xmlrpc/test_dns_plugin.py
@@ -114,7 +114,7 @@ class test_dns(Declarative):
),
expected=errors.ValidationError(name='name',
error=u'only letters, numbers, and - are allowed. ' +
- u'- must not be the DNS label character'),
+ u'DNS label may not start or end with -'),
),
@@ -478,7 +478,7 @@ class test_dns(Declarative):
command=('dnsrecord_add', [dnszone1, u'invalid record'], {'arecord': u'127.0.0.1'}),
expected=errors.ValidationError(name='name',
error=u'only letters, numbers, _, and - are allowed. ' +
- u'- must not be the DNS label character'),
+ u'DNS label may not start or end with -'),
),
@@ -639,7 +639,7 @@ class test_dns(Declarative):
'srv_part_target' : u'foo bar'}),
expected=errors.ValidationError(name='srv_target',
error=u'invalid domain-name: only letters, numbers, and - ' +
- u'are allowed. - must not be the DNS label character'),
+ u'are allowed. DNS label may not start or end with -'),
),
dict(
@@ -734,7 +734,7 @@ class test_dns(Declarative):
command=('dnsrecord_add', [dnszone1, dnsres1], {'cnamerecord': u'-.example.com' }),
expected=errors.ValidationError(name='hostname',
error=u'invalid domain-name: only letters, numbers, and - ' +
- u'are allowed. - must not be the DNS label character'),
+ u'are allowed. DNS label may not start or end with -'),
),
dict(
@@ -908,7 +908,7 @@ class test_dns(Declarative):
command=('dnsrecord_add', [revdnszone1, dnsrev1], {'ptrrecord': u'-.example.com' }),
expected=errors.ValidationError(name='hostname',
error=u'invalid domain-name: only letters, numbers, and - ' +
- u'are allowed. - must not be the DNS label character'),
+ u'are allowed. DNS label may not start or end with -'),
),
dict(
diff --git a/tests/test_xmlrpc/test_host_plugin.py b/tests/test_xmlrpc/test_host_plugin.py
index b7b3567b..8798168a 100644
--- a/tests/test_xmlrpc/test_host_plugin.py
+++ b/tests/test_xmlrpc/test_host_plugin.py
@@ -698,7 +698,7 @@ class test_host(Declarative):
command=('host_add', [invalidfqdn1], {}),
expected=errors.ValidationError(name='hostname',
error=u'invalid domain-name: only letters, numbers, and - ' +
- u'are allowed. - must not be the DNS label character'),
+ u'are allowed. DNS label may not start or end with -'),
),
diff --git a/tests/test_xmlrpc/test_netgroup_plugin.py b/tests/test_xmlrpc/test_netgroup_plugin.py
index afb2ac73..40ad1ea6 100644
--- a/tests/test_xmlrpc/test_netgroup_plugin.py
+++ b/tests/test_xmlrpc/test_netgroup_plugin.py
@@ -363,7 +363,8 @@ class test_netgroup(Declarative):
desc='Add invalid host %r to netgroup %r' % (invalidhost, netgroup1),
command=('netgroup_add_member', [netgroup1], dict(host=invalidhost)),
expected=errors.ValidationError(name='host',
- error='only letters, numbers, _, and - are allowed. - must not be the DNS label character'),
+ error='only letters, numbers, _, and - are allowed. ' +
+ u'DNS label may not start or end with -'),
),