diff options
author | Stephan Szabo <stephan.szabo@sony.com> | 2019-06-19 15:54:18 -0700 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-06-20 08:33:13 +0200 |
commit | 2aff76c571e72d78af690e5fd6ba11642fb06f14 (patch) | |
tree | 54ae938a15c3f530ec8d4af0525b055148b0d954 /tests/smbserver.py | |
parent | cf35bd79bdbe7b2155c87ed5a5da7815367ec9de (diff) | |
download | curl-2aff76c571e72d78af690e5fd6ba11642fb06f14.tar.gz |
tests: support non-localhost HOSTIP for dict/smb servers
smbserver.py/dictserver.py were explicitly using localhost/127.0.0.1 for
binding the server which when we were running the tests with a separate
HOSTIP and CLIENTIP had failures verifying the server from the device we
were testing.
This changes them to take the address from runtests.py and default to
localhost/127.0.0.1 if none is given.
Closes #4048
Diffstat (limited to 'tests/smbserver.py')
-rwxr-xr-x | tests/smbserver.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/smbserver.py b/tests/smbserver.py index 195ae395b..474e0612b 100755 --- a/tests/smbserver.py +++ b/tests/smbserver.py @@ -86,7 +86,7 @@ def smbserver(options): test_data_dir = os.path.join(options.srcdir, "data") - smb_server = TestSmbServer(("127.0.0.1", options.port), + smb_server = TestSmbServer((options.host, options.port), config_parser=smb_config, test_data_directory=test_data_dir) log.info("[SMB] setting up SMB server on port %s", options.port) @@ -312,6 +312,8 @@ def get_options(): parser.add_argument("--port", action="store", default=9017, type=int, help="port to listen on") + parser.add_argument("--host", action="store", default="127.0.0.1", + help="host to listen on") parser.add_argument("--verbose", action="store", type=int, default=0, help="verbose output") parser.add_argument("--pidfile", action="store", |