1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

add centos -i nochange test

This commit is contained in:
Kelly Brazil
2022-02-01 16:16:33 -08:00
parent 8f3b12e81e
commit 8061f30e6f
3 changed files with 236 additions and 6 deletions

View File

@ -22,11 +22,12 @@ class MyTests(unittest.TestCase):
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/rsync-i-vvv.out'), 'r', encoding='utf-8') as f:
self.osx_10_14_6_rsync_ivvv = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/rsync-ivvv-nochange.out'), 'r', encoding='utf-8') as f:
self.centos_7_7_rsync_ivvv_nochange = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/rsync-i-vvv-nochange.out'), 'r', encoding='utf-8') as f:
self.osx_10_14_6_rsync_ivvv_nochange = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/rsync-i-logfile.out'), 'r', encoding='utf-8') as f:
self.centos_7_7_rsync_i_logfile = f.read()
@ -55,16 +56,15 @@ class MyTests(unittest.TestCase):
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/rsync-ivvv.json'), 'r', encoding='utf-8') as f:
self.centos_7_7_rsync_ivvv_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/rsync-i-vvv.json'), 'r', encoding='utf-8') as f:
self.osx_10_14_6_rsync_ivvv_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/rsync-ivvv-nochange.json'), 'r', encoding='utf-8') as f:
self.centos_7_7_rsync_ivvv_nochange_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/rsync-i-vvv-nochange.json'), 'r', encoding='utf-8') as f:
self.osx_10_14_6_rsync_ivvv_nochange_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/rsync-i-logfile.json'), 'r', encoding='utf-8') as f:
self.centos_7_7_rsync_i_logfile_json = json.loads(f.read())
@ -107,7 +107,6 @@ class MyTests(unittest.TestCase):
"""
self.assertEqual(jc.parsers.rsync.parse(self.centos_7_7_rsync_ivvv, quiet=True), self.centos_7_7_rsync_ivvv_json)
def test_rsync_osx_10_14_6_rsync_ivvv(self):
"""
Test 'rsync -ivvv' on OSX 10.14.6
@ -119,6 +118,12 @@ class MyTests(unittest.TestCase):
Test 'rsync -ivvv' on OSX 10.14.6 with no file changes
"""
self.assertEqual(jc.parsers.rsync.parse(self.osx_10_14_6_rsync_ivvv_nochange, quiet=True), self.osx_10_14_6_rsync_ivvv_nochange_json)
def test_rsync_centos_7_7_rsync_ivvv_nochange(self):
"""
Test 'rsync -ivvv' on Centos 7.7 with no file changes
"""
self.assertEqual(jc.parsers.rsync.parse(self.centos_7_7_rsync_ivvv_nochange, quiet=True), self.centos_7_7_rsync_ivvv_nochange_json)
def test_rsync_centos_7_7_rsync_i_logfile(self):
"""