Test payspark import

This commit is contained in:
Peter Parente
2020-02-15 18:53:58 -05:00
parent 3aa61f94c2
commit 4a8b58a41b
2 changed files with 13 additions and 2 deletions

View File

@@ -16,4 +16,15 @@ def test_spark_shell(container):
c.wait(timeout=30)
logs = c.logs(stdout=True).decode('utf-8')
LOGGER.debug(logs)
assert 'res0: Int = 2' in logs
assert 'res0: Int = 2' in logs
def test_pyspark(container):
"""PySpark should be in the Python path"""
c = container.run(
tty=True,
command=['start.sh', 'python', '-c', '"import pyspark"']
)
rv = c.wait(timeout=30)
assert rv == 0 or rv["StatusCode"] == 0
logs = c.logs(stdout=True).decode('utf-8')
LOGGER.debug(logs)