Fix external utility tests to run on Windows

This commit is contained in:
Dave Page 2019-07-12 13:55:18 +01:00
parent 3f4d5a687b
commit 6b5ca07715
6 changed files with 24 additions and 0 deletions

View File

@ -653,6 +653,10 @@ class BackupCreateJobTest(BaseTestGenerator):
binary_path = os.path.join(
self.server['default_binary_paths'][self.server['type']],
'pg_dump')
if os.name == 'nt':
binary_path = binary_path + '.exe'
retVal = does_utility_exist(binary_path)
if retVal is not None:
self.skipTest(retVal)

View File

@ -52,6 +52,10 @@ class BackupJobTest(BaseTestGenerator):
binary_path = os.path.join(
self.server['default_binary_paths'][self.server['type']],
'pg_dump')
if os.name == 'nt':
binary_path = binary_path + '.exe'
retVal = does_utility_exist(binary_path)
if retVal is not None:
self.skipTest(retVal)

View File

@ -52,6 +52,10 @@ class MaintenanceJobTest(BaseTestGenerator):
binary_path = os.path.join(
self.server['default_binary_paths'][self.server['type']], 'psql')
if os.name == 'nt':
binary_path = binary_path + '.exe'
retVal = does_utility_exist(binary_path)
if retVal is not None:
self.skipTest(retVal)

View File

@ -141,6 +141,10 @@ class MaintenanceCreateJobTest(BaseTestGenerator):
binary_path = os.path.join(
self.server['default_binary_paths'][self.server['type']], 'psql')
if os.name == 'nt':
binary_path = binary_path + '.exe'
retVal = does_utility_exist(binary_path)
if retVal is not None:
self.skipTest(retVal)

View File

@ -75,6 +75,10 @@ class RestoreJobTest(BaseTestGenerator):
binary_path = os.path.join(
self.server['default_binary_paths'][self.server['type']],
'pg_restore')
if os.name == 'nt':
binary_path = binary_path + '.exe'
retVal = does_utility_exist(binary_path)
if retVal is not None:
self.skipTest(retVal)

View File

@ -305,6 +305,10 @@ class RestoreCreateJobTest(BaseTestGenerator):
binary_path = os.path.join(
self.server['default_binary_paths'][self.server['type']],
'pg_restore')
if os.name == 'nt':
binary_path = binary_path + '.exe'
retVal = does_utility_exist(binary_path)
if retVal is not None:
self.skipTest(retVal)