Tests: Remove unecessary TCP options for non-Windows ClamD tests

The non-Windows ClamD tests use the LocalSocket option.
pull/1491/head
Valerie Snyder 3 weeks ago
parent 8ac8f4ac8a
commit b34cd8ca4e
No known key found for this signature in database
GPG Key ID: DCBE519BFAF4C517
  1. 18
      unit_tests/clamd_test.py

@ -48,7 +48,7 @@ class TC(testcase.TestCase):
TC.clamd_socket = 'clamd-test.socket' # <-- A relative path here and in check_clamd to avoid-
# test failures caused by (invalid) long socket filepaths.
# The max length for a socket file path is _really_ short.
TC.clamd_port_num = 3319 # <-- This is hard-coded into the `check_clamd` program
TC.clamd_port_num = 3319 # <-- This is hard-coded into the `check_clamd` program on Windows.
TC.path_db = TC.path_tmp / 'database'
TC.path_db.mkdir(parents=True)
shutil.copy(
@ -96,9 +96,7 @@ class TC(testcase.TestCase):
# Use LocalSocket for Posix, because that's what check_clamd expects.
config += '''
LocalSocket {localsocket}
TCPSocket {tcpsocket}
TCPAddr localhost
'''.format(localsocket=TC.clamd_socket, tcpsocket=TC.clamd_port_num)
'''.format(localsocket=TC.clamd_socket)
TC.clamd_config = TC.path_tmp / 'clamd-test.conf'
TC.clamd_config.write_text(config)
@ -616,9 +614,7 @@ class TC(testcase.TestCase):
# Use LocalSocket for Posix, because that's what check_clamd expects.
config += '''
LocalSocket {localsocket}
TCPSocket {tcpsocket}
TCPAddr localhost
'''.format(localsocket=TC.clamd_socket, tcpsocket=TC.clamd_port_num)
'''.format(localsocket=TC.clamd_socket)
clamd_config = TC.path_tmp / 'clamd-test.conf'
clamd_config.write_text(config)
@ -692,9 +688,7 @@ class TC(testcase.TestCase):
# Use LocalSocket for Posix, because that's what check_clamd expects.
config += '''
LocalSocket {localsocket}
TCPSocket {tcpsocket}
TCPAddr localhost
'''.format(localsocket=TC.clamd_socket, tcpsocket=TC.clamd_port_num)
'''.format(localsocket=TC.clamd_socket)
clamd_config = TC.path_tmp / 'clamd-test.conf'
clamd_config.write_text(config)
@ -776,9 +770,7 @@ class TC(testcase.TestCase):
# Use LocalSocket for Posix, because that's what check_clamd expects.
config += '''
LocalSocket {localsocket}
TCPSocket {tcpsocket}
TCPAddr localhost
'''.format(localsocket=TC.clamd_socket, tcpsocket=TC.clamd_port_num)
'''.format(localsocket=TC.clamd_socket)
clamd_config = TC.path_tmp / 'clamd-test.conf'
clamd_config.write_text(config)

Loading…
Cancel
Save