mirror of
https://github.com/apache/superset.git
synced 2026-04-07 10:31:50 +00:00
feat: get docker-compose to work as the backend for Cypress tests (#31796)
This commit is contained in:
committed by
GitHub
parent
2874096e27
commit
840773e626
@@ -22,6 +22,7 @@
|
||||
#
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
from celery.schedules import crontab
|
||||
from flask_caching.backends.filesystemcache import FileSystemCache
|
||||
@@ -107,6 +108,18 @@ SQLLAB_CTAS_NO_LIMIT = True
|
||||
log_level_text = os.getenv("SUPERSET_LOG_LEVEL", "INFO")
|
||||
LOG_LEVEL = getattr(logging, log_level_text.upper(), logging.INFO)
|
||||
|
||||
if os.getenv("CYPRESS_CONFIG") == "true":
|
||||
# When running the service as a cypress backend, we need to import the config
|
||||
# located @ tests/integration_tests/superset_test_config.py
|
||||
base_dir = os.path.dirname(__file__)
|
||||
module_folder = os.path.abspath(
|
||||
os.path.join(base_dir, "../../tests/integration_tests/")
|
||||
)
|
||||
sys.path.insert(0, module_folder)
|
||||
from superset_test_config import * # noqa
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
#
|
||||
# Optionally import superset_config_docker.py (which will have been included on
|
||||
# the PYTHONPATH) in order to allow for local settings to be overridden
|
||||
|
||||
Reference in New Issue
Block a user