2022-06-30 20:45:15 +00:00
|
|
|
import os
|
|
|
|
from time import sleep
|
|
|
|
|
|
|
|
import pytest
|
2022-11-22 19:04:29 +00:00
|
|
|
from tests_examples_app.public import _PATH_EXAMPLES
|
2022-06-30 20:45:15 +00:00
|
|
|
|
|
|
|
from lightning_app.testing.testing import run_app_in_cloud
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.cloud
|
|
|
|
def test_drive_example_cloud() -> None:
|
2022-11-22 19:04:29 +00:00
|
|
|
with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_drive")) as (
|
2022-06-30 20:45:15 +00:00
|
|
|
_,
|
2022-08-10 11:17:29 +00:00
|
|
|
_,
|
2022-06-30 20:45:15 +00:00
|
|
|
fetch_logs,
|
2022-08-10 09:48:06 +00:00
|
|
|
_,
|
2022-06-30 20:45:15 +00:00
|
|
|
):
|
|
|
|
|
|
|
|
has_logs = False
|
|
|
|
while not has_logs:
|
2022-10-25 13:24:20 +00:00
|
|
|
for log in fetch_logs(["flow"]):
|
2022-06-30 20:45:15 +00:00
|
|
|
if "Application End!" in log:
|
|
|
|
has_logs = True
|
|
|
|
sleep(1)
|