本文整理汇总了Python中dockertest.containers.DockerContainers.get_container_list方法的典型用法代码示例。如果您正苦于以下问题:Python DockerContainers.get_container_list方法的具体用法?Python DockerContainers.get_container_list怎么用?Python DockerContainers.get_container_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dockertest.containers.DockerContainers
的用法示例。
在下文中一共展示了DockerContainers.get_container_list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_once
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import get_container_list [as 别名]
def run_once(self):
super(psa, self).run_once()
OutputGood(self.stuff['cmdresult'], "test container failed on start")
self.loginfo("Container running, waiting %d seconds to examine"
% self.config['wait_start'])
time.sleep(self.config['wait_start'])
# This is the test-subject, need to check output of docker command
clic = DockerContainers(self, 'clic')
self.stuff['cl1'] = clic.get_container_list()
sig = getattr(signal, 'SIGURG') # odd-ball, infreq. used.
self.loginfo("Signaling container with signal %s", sig)
nfdc = NoFailDockerCmd(self, 'kill', ['--signal', "URG",
self.stuff['container_id']])
nfdc.execute()
self.loginfo("Waiting up to %d seconds for exit",
self.config['wait_stop'])
time.sleep(self.config['wait_stop'])
# Final listing, expect container to have exited
self.stuff['cl2'] = clic.get_container_list()