You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcpcfg/t/test_ngcpcfg_status.py

26 lines
568 B

#!/usr/bin/env py.test-3
import pytest
import re
from pathlib import Path
@pytest.mark.status
def test_status(ngcpcfgcli):
out = ngcpcfgcli(
"status",
)
assert out.returncode == 0
@pytest.mark.status
def test_status_build(ngcpcfg, ngcpcfgcli):
env, cfg = ngcpcfg()
new_file = Path(env["STATE_FILES_DIR"]).joinpath("build")
new_file.write_text("hola")
out = ngcpcfgcli("status", env=env)
assert out.returncode == 0
assert re.search(
r"ACTION_NEEDED: commits without according build identified", out.stdout
)