summaryrefslogtreecommitdiffstats
path: root/ipatests/test_cmdline
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2014-09-19 12:38:34 +0200
committerPetr Viktorin <pviktori@redhat.com>2014-09-25 16:38:02 +0200
commitbc2eaa145637e1947449ee53548243ab22059805 (patch)
treeccd9d907fbfc9691d09eed3ba6f8ab91b4a9537e /ipatests/test_cmdline
parent23620a40255c8f3963ce8ca012c34f340b2f780b (diff)
downloadfreeipa-bc2eaa145637e1947449ee53548243ab22059805.tar.gz
freeipa-bc2eaa145637e1947449ee53548243ab22059805.tar.xz
freeipa-bc2eaa145637e1947449ee53548243ab22059805.zip
DNS tests: tests update to due to change in options
Affected options --name-server, --ip-address Part of ticket: https://fedorahosted.org/freeipa/ticket/4149 Reviewed-By: Petr Spacek <pspacek@redhat.com>
Diffstat (limited to 'ipatests/test_cmdline')
-rw-r--r--ipatests/test_cmdline/test_cli.py78
1 files changed, 4 insertions, 74 deletions
diff --git a/ipatests/test_cmdline/test_cli.py b/ipatests/test_cmdline/test_cli.py
index 489d2ceb3..b450e8511 100644
--- a/ipatests/test_cmdline/test_cli.py
+++ b/ipatests/test_cmdline/test_cli.py
@@ -139,14 +139,13 @@ class TestCLIParsing(object):
def test_dnsrecord_del_all(self):
try:
- self.run_command('dnszone_add', idnsname=u'test-example.com',
- idnssoamname=u'ns.test-example.com', force=True)
+ self.run_command('dnszone_add', idnsname=u'test-example.com')
except errors.NotFound:
raise nose.SkipTest('DNS is not configured')
try:
self.run_command('dnsrecord_add',
dnszoneidnsname=u'test-example.com',
- idnsname=u'ns', arecord=u'1.2.3.4')
+ idnsname=u'ns', arecord=u'1.2.3.4', force=True)
with self.fake_stdin('yes\n'):
self.check_command('dnsrecord_del test-example.com ns',
'dnsrecord_del',
@@ -168,8 +167,7 @@ class TestCLIParsing(object):
def test_dnsrecord_del_one_by_one(self):
try:
- self.run_command('dnszone_add', idnsname=u'test-example.com',
- idnssoamname=u'ns.test-example.com', force=True)
+ self.run_command('dnszone_add', idnsname=u'test-example.com')
except errors.NotFound:
raise nose.SkipTest('DNS is not configured')
try:
@@ -243,8 +241,7 @@ class TestCLIParsing(object):
def test_dnsrecord_del_comma(self):
try:
self.run_command(
- 'dnszone_add', idnsname=u'test-example.com',
- idnssoamname=u'ns.test-example.com', force=True)
+ 'dnszone_add', idnsname=u'test-example.com')
except errors.NotFound:
raise nose.SkipTest('DNS is not configured')
try:
@@ -266,73 +263,6 @@ class TestCLIParsing(object):
finally:
self.run_command('dnszone_del', idnsname=u'test-example.com')
- def test_dnszone_add(self):
- """
- Test dnszone-add with nameserver IP passed interatively
- """
- # Pass IP of nameserver interactively for nameserver in zone
- # (absolute name)
- with self.fake_stdin('1.1.1.1\n'):
- self.check_command(
- 'dnszone_add example.com --name-server=ns.example.com. '
- '--admin-email=admin@example.com',
- 'dnszone_add',
- idnsname=u'example.com',
- idnssoamname=u'ns.example.com.',
- idnssoarname=u'admin@example.com',
- ip_address=u'1.1.1.1',
- idnssoaexpire=util.Fuzzy(type=int),
- idnssoaserial=util.Fuzzy(type=int),
- idnssoaretry=util.Fuzzy(type=int),
- idnssoaminimum=util.Fuzzy(type=int),
- idnssoarefresh=util.Fuzzy(type=int),
- all=False,
- raw=False,
- force=False,
- version=API_VERSION
- )
-
- # Pass IP of nameserver interactively for nameserver in zone
- # (relative name)
- with self.fake_stdin('1.1.1.1\n'):
- self.check_command(
- 'dnszone_add example.com --name-server=ns '
- '--admin-email=admin@example.com',
- 'dnszone_add',
- idnsname=u'example.com',
- idnssoamname=u'ns',
- idnssoarname=u'admin@example.com',
- ip_address=u'1.1.1.1',
- idnssoaexpire=util.Fuzzy(type=int),
- idnssoaserial=util.Fuzzy(type=int),
- idnssoaretry=util.Fuzzy(type=int),
- idnssoaminimum=util.Fuzzy(type=int),
- idnssoarefresh=util.Fuzzy(type=int),
- all=False,
- raw=False,
- force=False,
- version=API_VERSION
- )
-
- # Nameserver is outside the zone - no need to pass the IP
- self.check_command(
- 'dnszone_add example.com --name-server=ns.example.net. '
- '--admin-email=admin@example.com',
- 'dnszone_add',
- idnsname=u'example.com',
- idnssoamname=u'ns.example.net.',
- idnssoarname=u'admin@example.com',
- idnssoaexpire=util.Fuzzy(type=int),
- idnssoaserial=util.Fuzzy(type=int),
- idnssoaretry=util.Fuzzy(type=int),
- idnssoaminimum=util.Fuzzy(type=int),
- idnssoarefresh=util.Fuzzy(type=int),
- all=False,
- raw=False,
- force=False,
- version=API_VERSION
- )
-
def test_idrange_add(self):
"""
Test idrange-add with interative prompt