feat(api): database schemas migration to new API (#10436)

* fix(log): log crashes if expired or not authenticated

* fix lint and rison

* add tests

* more tests

* perm fix

* fix test not found

* JS lint

* fix Jest test
This commit is contained in:
Daniel Vaz Gaspar
2020-07-29 09:33:15 +01:00
committed by GitHub
parent 0aad9c6f48
commit 671461d0d0
6 changed files with 153 additions and 20 deletions

View File

@@ -196,13 +196,13 @@ describe('TableSelector', () => {
});
describe('fetchSchemas', () => {
const FETCH_SCHEMAS_GLOB = 'glob:*/superset/schemas/*/*/';
const FETCH_SCHEMAS_GLOB = 'glob:*/api/v1/database/*/schemas/?q=(force:!*)';
afterEach(fetchMock.resetHistory);
afterAll(fetchMock.reset);
it('should fetch schema options', () => {
const schemaOptions = {
schemas: ['main', 'erf', 'superset'],
result: ['main', 'erf', 'superset'],
};
fetchMock.get(FETCH_SCHEMAS_GLOB, schemaOptions, {
overwriteRoutes: true,