test(gateway-image): probe package imports, not pre-refactor flat modules #430
@@ -86,13 +86,12 @@ class TestGatewayImage(unittest.TestCase):
|
|||||||
self.assertIn("Mitmproxy", out)
|
self.assertIn("Mitmproxy", out)
|
||||||
|
|
||||||
def test_python_imports_supervise_module(self):
|
def test_python_imports_supervise_module(self):
|
||||||
# The bundle's supervise daemon imports `supervise` as a
|
# The supervise daemon is installed as part of the bot_bottle
|
||||||
# same-directory sibling of `supervise_server`. Probe the
|
# package (5ad3449), not as flat sibling modules under /app.
|
||||||
# import resolves with `python3 -c` from /app (the
|
# Probe that the package imports resolve inside the image.
|
||||||
# Dockerfile's WORKDIR).
|
|
||||||
rc, out = self._run_in_image(
|
rc, out = self._run_in_image(
|
||||||
"python3", "-c",
|
"python3", "-c",
|
||||||
"import supervise; import supervise_server; print('ok')",
|
"from bot_bottle import supervise, supervise_server; print('ok')",
|
||||||
)
|
)
|
||||||
self.assertEqual(0, rc, msg=out)
|
self.assertEqual(0, rc, msg=out)
|
||||||
self.assertIn("ok", out)
|
self.assertIn("ok", out)
|
||||||
|
|||||||
Reference in New Issue
Block a user