test_marathon.py 文件源码

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

项目:deb-python-dcos 作者: openstack 项目源码 文件源码
def test_show_missing_relative_app_version():
    app_id = _ZERO_INSTANCE_APP_ID

    with _zero_instance_app():
        _update_app(
            app_id,
            'tests/data/marathon/apps/update_zero_instance_sleep.json')

        # Marathon persists app versions indefinitely by ID, so pick a large
        # index here in case the history is long
        cmd = ['dcos', 'marathon', 'app', 'show', '--app-version=-200', app_id]
        returncode, stdout, stderr = exec_command(cmd)

        assert returncode == 1
        assert stdout == b''

        pattern = ("Application 'zero-instance-app' only has [1-9][0-9]* "
                   "version\\(s\\)\\.\n")
        assert re.fullmatch(pattern, stderr.decode('utf-8'), flags=re.DOTALL)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号