def setUpClass(cls):
""" Initialise the test class.
"""
warnings.simplefilter('ignore', ResourceWarning)
# Get a client to the local docker engine.
client = docker.from_env()
# Skip the tests in this class if not running from a manager node.
if not client.info()['Swarm']['ControlAvailable']:
raise unittest.SkipTest('This test must be run from a swarm '
'manager node.')
# client.swarm.init()
# Create a logging server
# FIXME(BM): This should not be needed to test heartbeat!
paas = Paas()
cls.logger = paas.run_service(
'logging_server',
'sip',
[logging.handlers.DEFAULT_TCP_LOGGING_PORT],
['python3', 'sip/common/logging_server.py'])
# Wait for the logging server to come online.
time.sleep(3)
disabled_test_heartbeat.py 文件源码
python
阅读 14
收藏 0
点赞 0
评论 0
评论列表
文章目录