Test if stderr is in output
This commit is contained in:
parent
0a9efe85d2
commit
8cb17dea54
1 changed files with 10 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
from pybuilder.core import Project
|
from pybuilder.core import Project
|
||||||
|
from subprocess import Popen, PIPE, run
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from src.main.python.ddadevops.domain import (
|
from src.main.python.ddadevops.domain import (
|
||||||
BuildType,
|
BuildType,
|
||||||
|
@ -12,3 +13,12 @@ def test_devops_build_commons_path():
|
||||||
assert image is not None
|
assert image is not None
|
||||||
assert image.is_valid()
|
assert image.is_valid()
|
||||||
assert "docker/" == image.build_commons_path()
|
assert "docker/" == image.build_commons_path()
|
||||||
|
|
||||||
|
def test_docker_fails_with_error_msg():
|
||||||
|
output = run(
|
||||||
|
f"docker build asdfsdf",
|
||||||
|
shell=True,
|
||||||
|
check=True,
|
||||||
|
stderr=PIPE,
|
||||||
|
text=True
|
||||||
|
).stderr
|
||||||
|
|
Loading…
Reference in a new issue