mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Generalize switch between different datasources (#1078)
* Generalize switch between different datasources. * Fix previous migration since slice model changed * Fix warm up cache and other small stuff * Adding modules and datasources through config * Replace tabs w/ spaces * Fix other style issues * Change add method for SliceModelView to pick the first non-empty ds * Remove tests on slice add redirect * Change way of db migration * Fix styling * Fix create slice * Small fixes * Fix code climate check * Adding notes on how to create new datasource in CONTRIBUTING.md * Fix last merge * A commit just to trigger travis build again * Add migration to merge two heads * Fix codeclimate * Simplify source_registry * Fix codeclimate * Remove all getter methods
This commit is contained in:
committed by
Maxime Beauchemin
parent
ed2feaf84b
commit
5a0e06e7a2
@@ -210,32 +210,6 @@ class CoreTests(CaravelTestCase):
|
||||
assert new_slice in dash.slices
|
||||
assert len(set(dash.slices)) == len(dash.slices)
|
||||
|
||||
def test_add_slice_redirect_to_sqla(self, username='admin'):
|
||||
self.login(username=username)
|
||||
url = '/slicemodelview/add'
|
||||
resp = self.client.get(url, follow_redirects=True)
|
||||
assert (
|
||||
"Click on a table link to create a Slice" in
|
||||
resp.data.decode('utf-8')
|
||||
)
|
||||
|
||||
def test_add_slice_redirect_to_druid(self, username='admin'):
|
||||
datasource = DruidDatasource(
|
||||
datasource_name="datasource_name",
|
||||
)
|
||||
db.session.add(datasource)
|
||||
db.session.commit()
|
||||
|
||||
self.login(username=username)
|
||||
url = '/slicemodelview/add'
|
||||
resp = self.client.get(url, follow_redirects=True)
|
||||
assert (
|
||||
"Click on a datasource link to create a Slice"
|
||||
in resp.data.decode('utf-8')
|
||||
)
|
||||
|
||||
db.session.delete(datasource)
|
||||
db.session.commit()
|
||||
|
||||
def test_druid_sync_from_config(self):
|
||||
cluster = models.DruidCluster(cluster_name="new_druid")
|
||||
|
||||
Reference in New Issue
Block a user