Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache Superset: Also verify Superset 3 #218

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/apache-superset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-22.04 ]
superset-version: [ "2.*" ]
superset-version: [ "2.*", "3.*" ]
python-version: [ "3.11" ]

services:
Expand Down
9 changes: 8 additions & 1 deletion framework/apache-superset/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,14 @@ def provision_superset(start_superset):
)

assert response.status_code == 201
assert response.json() == {
payload = response.json()

# Superset 3 uses UUIDs to identify resources.
# Remove them for comparison purposes.
if "uuid" in payload["result"]:
del payload["result"]["uuid"]

assert payload == {
"id": 1,
"result": {
"configuration_method": "sqlalchemy_form",
Expand Down
2 changes: 1 addition & 1 deletion framework/apache-superset/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apache-superset==2.*
apache-superset
crate[sqlalchemy]==0.34.0
marshmallow_enum<2 # Seems to be missing from `apache-superset`?
2 changes: 1 addition & 1 deletion framework/apache-superset/superset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db?check_same_thread=false'

# Flask-WTF flag for CSRF
WTF_CSRF_ENABLED = True
WTF_CSRF_ENABLED = False
# Add endpoints that need to be exempt from CSRF protection
WTF_CSRF_EXEMPT_LIST = []
# A CSRF token that expires in 1 year
Expand Down
1 change: 0 additions & 1 deletion framework/apache-superset/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def test_ui():
html_title = page.text_content("title").strip()
assert html_title == "Superset"
assert page.url.endswith("/superset/welcome/")
assert page.text_content("h1") == "Home"

# Invoke SQL Lab with an example query, and verify response.
sql = "SELECT * FROM sys.summits LIMIT 42;"
Expand Down