mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
DI-1113. Authentication: Enable user impersonation for Superset to HiveServer2 using hive.server2.proxy.user (a.fernandez) (#3652)
This commit is contained in:
committed by
Maxime Beauchemin
parent
08f09b4761
commit
adef519583
@@ -276,13 +276,15 @@ class CoreTests(SupersetTestCase):
|
||||
assert self.get_resp('/health') == "OK"
|
||||
assert self.get_resp('/ping') == "OK"
|
||||
|
||||
def test_testconn(self):
|
||||
def test_testconn(self, username='admin'):
|
||||
self.login(username=username)
|
||||
database = self.get_main_database(db.session)
|
||||
|
||||
# validate that the endpoint works with the password-masked sqlalchemy uri
|
||||
data = json.dumps({
|
||||
'uri': database.safe_sqlalchemy_uri(),
|
||||
'name': 'main'
|
||||
'name': 'main',
|
||||
'impersonate_user': False
|
||||
})
|
||||
response = self.client.post('/superset/testconn', data=data, content_type='application/json')
|
||||
assert response.status_code == 200
|
||||
@@ -291,7 +293,8 @@ class CoreTests(SupersetTestCase):
|
||||
# validate that the endpoint works with the decrypted sqlalchemy uri
|
||||
data = json.dumps({
|
||||
'uri': database.sqlalchemy_uri_decrypted,
|
||||
'name': 'main'
|
||||
'name': 'main',
|
||||
'impersonate_user': False
|
||||
})
|
||||
response = self.client.post('/superset/testconn', data=data, content_type='application/json')
|
||||
assert response.status_code == 200
|
||||
|
||||
Reference in New Issue
Block a user