ipatests: test that a zone name and name-from-ip will be rejected

If a zone name is provided then name-from-ip makes little sense,
don't allow it.

https://pagure.io/freeipa/issue/8446

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
This commit is contained in:
Rob Crittenden 2020-09-10 14:02:06 -04:00 committed by Alexander Bokovoy
parent 2265cb86cf
commit e92a4ba4ae

View File

@ -685,6 +685,20 @@ class test_dns(Declarative):
),
dict(
desc='Try to create a zone w/ a name and name-from-ipa %r' % zone1,
command=(
'dnszone_add', [zone1], {
'idnssoarname': zone1_rname,
'name_from_ip': revzone1_ip,
}
),
expected=errors.ValidationError(
message=u'invalid \'name-from-ip\': cannot be used when a '
'zone is specified'),
),
dict(
desc='Retrieve zone %r' % zone1,
command=('dnszone_show', [zone1], {}),