mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use different logging port for multimaster tests
This commit is contained in:
parent
11016cedf3
commit
104e0a0066
2 changed files with 4 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue