Skip to content

Commit

Permalink
TEMP: add negative tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeffman committed May 25, 2022
1 parent af7199c commit 8a709ee
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ipatests/test_xmlrpc/test_dns_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,12 @@
forwarder3_custom_port = u'172.16.15.254 port 8053'
forwarder4_custom_port = u'172.16.15.254 port 8053'
forwarder5_custom_port = u'172.16.15.254 port 8053'
forwarder_custom_port_inv1 = u'172.16.15.253 port 0'
forwarder_custom_port_inv2 = u'172.16.15.253 port 1000000000'
forwarder_custom_port_inv3 = u'172.16.15.253 port a'
forwarder_custom_port_inv4 = u'172.16.15.253 8053'
forwarder_custom_port_inv5 = u'a.b.c.d port 8053'
forwarder_custom_port_inv6 = u'172.16.15.253 prot 8053'

fwzone_custom_port = u'fwzone-custom.test.'
fwzone_custom_port_dnsname = DNSName(fwzone_custom_port)
Expand Down Expand Up @@ -4232,6 +4238,20 @@ def forward_zone_setup(self, declarative_setup):
},
),

dict(
desc=(
'Create forward zone %r with invalid forwarder %s'
% (fwzone_custom_port, forwarder_custom_port_inv1)
),
command=(
'dnsforwardzone_add', [fwzone_custom_port],
{'idnsforwarders': [forwarder_custom_port_inv1]}
),
expected=errors.ValidationError(
name='idnsforwarders',
error=u'Please specify forwarders.')
),

dict(
desc='Create forward zone %r with one forwarder with "first" policy' % fwzone3,
command=(
Expand Down

0 comments on commit 8a709ee

Please sign in to comment.