Unify docker usage in tests

This commit is contained in:
Ayaz Salikhov
2022-01-22 00:46:20 +02:00
parent 2fee7b754c
commit 12b618c5da
17 changed files with 104 additions and 146 deletions

View File

@@ -10,11 +10,9 @@ LOGGER = logging.getLogger(__name__)
def test_spark_shell(container: TrackedContainer) -> None:
"""Checking if Spark (spark-shell) is running properly"""
c = container.run(
logs = container.run_and_wait(
timeout=60,
tty=True,
command=["start.sh", "bash", "-c", 'spark-shell <<< "1+1"'],
)
c.wait(timeout=60)
logs = c.logs(stdout=True).decode("utf-8")
LOGGER.debug(logs)
assert "res0: Int = 2" in logs, "spark-shell does not work"