mirror of https://github.com/apache/superset.git
chore: make flask-talisman work with test config (#29277)
This commit is contained in:
parent
4537ab6b1a
commit
796726376a
|
@ -97,7 +97,6 @@ ALERT_REPORTS_NOTIFICATION_DRY_RUN = True
|
|||
WEBDRIVER_BASEURL = "http://superset:8088/" # When using docker compose baseurl should be http://superset_app:8088/
|
||||
# The base URL for the email report hyperlinks.
|
||||
WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL
|
||||
|
||||
SQLLAB_CTAS_NO_LIMIT = True
|
||||
|
||||
#
|
||||
|
|
|
@ -61,7 +61,10 @@ function test_init() {
|
|||
DB_NAME="test"
|
||||
DB_USER="superset"
|
||||
DB_PASSWORD="superset"
|
||||
|
||||
# Pointing to use the test database in local docker-compose setup
|
||||
export SUPERSET__SQLALCHEMY_DATABASE_URI=${SUPERSET__SQLALCHEMY_DATABASE_URI:-postgresql+psycopg2://"${DB_USER}":"${DB_PASSWORD}"@localhost/"${DB_NAME}"}
|
||||
|
||||
export SUPERSET_CONFIG=${SUPERSET_CONFIG:-tests.integration_tests.superset_test_config}
|
||||
RUN_INIT=1
|
||||
RUN_RESET_DB=1
|
||||
|
|
|
@ -261,7 +261,7 @@ WTF_CSRF_EXEMPT_LIST = [
|
|||
]
|
||||
|
||||
# Whether to run the web server in debug mode or not
|
||||
DEBUG = os.environ.get("FLASK_DEBUG")
|
||||
DEBUG = parse_boolean_string(os.environ.get("FLASK_DEBUG"))
|
||||
FLASK_USE_RELOAD = True
|
||||
|
||||
# Enable profiling of Python calls. Turn this on and append ``?_instrument=1``
|
||||
|
|
|
@ -586,7 +586,7 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
|
|||
talisman_enabled = self.config["TALISMAN_ENABLED"]
|
||||
talisman_config = (
|
||||
self.config["TALISMAN_DEV_CONFIG"]
|
||||
if self.superset_app.debug
|
||||
if self.superset_app.debug or self.config["DEBUG"]
|
||||
else self.config["TALISMAN_CONFIG"]
|
||||
)
|
||||
csp_warning = self.config["CONTENT_SECURITY_POLICY_WARNING"]
|
||||
|
|
|
@ -40,7 +40,6 @@ SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join( # noqa: F405
|
|||
DATA_DIR,
|
||||
"unittests.integration_tests.db", # noqa: F405
|
||||
)
|
||||
DEBUG = False
|
||||
SILENCE_FAB = False
|
||||
# Allowing SQLALCHEMY_DATABASE_URI and SQLALCHEMY_EXAMPLES_URI to be defined as an env vars for
|
||||
# continuous integration
|
||||
|
|
Loading…
Reference in New Issue