feat: the samples endpoint supports filters and pagination (#20683)

This commit is contained in:
Yongjie Zhao
2022-07-22 20:14:42 +08:00
committed by GitHub
parent 39545352d2
commit f011abae2b
13 changed files with 479 additions and 437 deletions

View File

@@ -29,8 +29,8 @@ import { SamplesPane } from '../components';
import { createSamplesPaneProps } from './fixture';
describe('SamplesPane', () => {
fetchMock.get(
'end:/api/v1/explore/samples?force=false&datasource_type=table&datasource_id=34',
fetchMock.post(
'end:/datasource/samples?force=false&datasource_type=table&datasource_id=34',
{
result: {
data: [],
@@ -40,8 +40,8 @@ describe('SamplesPane', () => {
},
);
fetchMock.get(
'end:/api/v1/explore/samples?force=true&datasource_type=table&datasource_id=35',
fetchMock.post(
'end:/datasource/samples?force=true&datasource_type=table&datasource_id=35',
{
result: {
data: [
@@ -54,8 +54,8 @@ describe('SamplesPane', () => {
},
);
fetchMock.get(
'end:/api/v1/explore/samples?force=false&datasource_type=table&datasource_id=36',
fetchMock.post(
'end:/datasource/samples?force=false&datasource_type=table&datasource_id=36',
400,
);