Merge pull request #54396 from dwoz/multimaster_logging

Use different logging port for multimaster tests
This commit is contained in:
Daniel Wozniak 2019-09-03 16:20:22 -07:00 committed by GitHub
commit 2c281e0bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 10 deletions

View file

@ -30,7 +30,6 @@ from tests.support.processes import start_daemon
# Import Salt libs
from tests.integration import (
SALT_LOG_PORT,
SocketServerRequestHandler,
TestDaemon,
TestDaemonStartFailed,
@ -48,6 +47,9 @@ from tests.support.processes import SaltMaster, SaltMinion
log = logging.getLogger(__name__)
SALT_LOG_PORT = get_unused_localhost_port()
class MultimasterTestDaemon(TestDaemon):
'''
Set up the master and minion daemons, and run related cases

View file

@ -41,15 +41,7 @@ from salt.ext.six.moves import range, builtins # pylint: disable=import-error,r
try:
from pytestsalt.utils import get_unused_localhost_port # pylint: disable=unused-import
except ImportError:
def get_unused_localhost_port():
'''
Return a random unused port on localhost
'''
usock = socket.socket(family=socket.AF_INET, type=socket.SOCK_STREAM)
usock.bind(('127.0.0.1', 0))
port = usock.getsockname()[1]
usock.close()
return port
from tests.integration import get_unused_localhost_port
# Import Salt Tests Support libs
from tests.support.unit import skip, _id