test_cli.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:skipper 作者: Stratoscale 项目源码 文件源码
def test_make_without_build_container_tag_with_context(self, skipper_runner_run_mock):
        global_params = self.global_params[:-2]
        makefile = 'Makefile'
        target = 'all'
        make_params = ['-f', makefile, target]
        self._invoke_cli(
            defaults=config.load_defaults(),
            global_params=global_params,
            subcmd='make',
            subcmd_params=make_params
        )
        expected_commands = [
            mock.call(['docker', 'build', '-t', 'build-container-image', '-f', 'Dockerfile.build-container-image',
                       SKIPPER_CONF_CONTAINER_CONTEXT]),
            mock.call(['make'] + make_params, fqdn_image='build-container-image', environment=[],
                      interactive=False, name=None, net='host', volumes=None, workdir=None, use_cache=False),
        ]
        skipper_runner_run_mock.assert_has_calls(expected_commands)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号