1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Adjust remaining unit tests due to extra records in test zone

This commit is contained in:
Mark Tearle
2021-01-30 15:44:32 +08:00
parent 84a0c089d4
commit 5d23977bbd
5 changed files with 23 additions and 21 deletions

View File

@@ -118,12 +118,12 @@ class TestManager(TestCase):
environ['YAML_TMP_DIR'] = tmpdir.dirname
tc = Manager(get_config_filename('simple.yaml')) \
.sync(dry_run=False)
self.assertEquals(22, tc)
self.assertEquals(24, tc)
# try with just one of the zones
tc = Manager(get_config_filename('simple.yaml')) \
.sync(dry_run=False, eligible_zones=['unit.tests.'])
self.assertEquals(16, tc)
self.assertEquals(18, tc)
# the subzone, with 2 targets
tc = Manager(get_config_filename('simple.yaml')) \
@@ -138,18 +138,18 @@ class TestManager(TestCase):
# Again with force
tc = Manager(get_config_filename('simple.yaml')) \
.sync(dry_run=False, force=True)
self.assertEquals(22, tc)
self.assertEquals(24, tc)
# Again with max_workers = 1
tc = Manager(get_config_filename('simple.yaml'), max_workers=1) \
.sync(dry_run=False, force=True)
self.assertEquals(22, tc)
self.assertEquals(24, tc)
# Include meta
tc = Manager(get_config_filename('simple.yaml'), max_workers=1,
include_meta=True) \
.sync(dry_run=False, force=True)
self.assertEquals(26, tc)
self.assertEquals(28, tc)
def test_eligible_sources(self):
with TemporaryDirectory() as tmpdir:
@@ -215,13 +215,13 @@ class TestManager(TestCase):
fh.write('---\n{}')
changes = manager.compare(['in'], ['dump'], 'unit.tests.')
self.assertEquals(16, len(changes))
self.assertEquals(18, len(changes))
# Compound sources with varying support
changes = manager.compare(['in', 'nosshfp'],
['dump'],
'unit.tests.')
self.assertEquals(15, len(changes))
self.assertEquals(17, len(changes))
with self.assertRaises(ManagerException) as ctx:
manager.compare(['nope'], ['dump'], 'unit.tests.')