From 2aff76c571e72d78af690e5fd6ba11642fb06f14 Mon Sep 17 00:00:00 2001 From: Stephan Szabo Date: Wed, 19 Jun 2019 15:54:18 -0700 Subject: 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 --- tests/dictserver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/dictserver.py') diff --git a/tests/dictserver.py b/tests/dictserver.py index a41a8a0d6..2d1b5a3b6 100755 --- a/tests/dictserver.py +++ b/tests/dictserver.py @@ -33,7 +33,7 @@ def dictserver(options): with open(options.pidfile, "w") as f: f.write("{0}".format(pid)) - local_bind = (HOST, options.port) + local_bind = (options.host, options.port) log.info("[DICT] Listening on %s", local_bind) # Need to set the allow_reuse on the class, not on the instance. @@ -83,6 +83,8 @@ def get_options(): parser.add_argument("--port", action="store", default=9016, type=int, help="port to listen on") + parser.add_argument("--host", action="store", default=HOST, + help="host to listen on") parser.add_argument("--verbose", action="store", type=int, default=0, help="verbose output") parser.add_argument("--pidfile", action="store", -- cgit v1.2.3