Merge pull request #3935 from Kriechi/smoke-test-docker

smoke-test docker images after building
This commit is contained in:
Thomas Kriechbaumer 2020-04-13 14:39:10 +02:00 committed by GitHub
commit bfb8da4b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -356,6 +356,20 @@ def build_docker_image(be: BuildEnviron): # pragma: no cover
"--file", "release/docker/Dockerfile", "--file", "release/docker/Dockerfile",
"." "."
]) ])
# smoke-test the newly built docker image
r = subprocess.run([
"docker",
"run",
"--rm",
"--it",
"mitmproxy/mitmproxy:" + be.docker_tag,
"mitmproxy",
"--version",
], check=True)
assert "Mitmproxy: " + be.version in r.stdout.decode()
assert "Python: " in r.stdout.decode()
assert "OpenSSL: " in r.stdout.decode()
assert "Platform: " in r.stdout.decode()
def build_pyinstaller(be: BuildEnviron): # pragma: no cover def build_pyinstaller(be: BuildEnviron): # pragma: no cover