Skip to content

Commit

Permalink
removed unwanted code and rearranged code
Browse files Browse the repository at this point in the history
Signed-off-by: sumukhswamy <[email protected]>
  • Loading branch information
sumukhswamy committed Dec 19, 2023
1 parent 5574f1d commit 5cefec0
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 62 deletions.
2 changes: 0 additions & 2 deletions public/components/SQLPage/__tests__/DataSelect.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ describe('Renders the Datasource picker component', () => {
});

const mockOnSelect = jest.fn();
const mockDataSource = jest.fn()
const asyncTest = () => {
render(
<DataSelect
Expand All @@ -43,7 +42,6 @@ describe('Renders the Datasource picker component', () => {
});

const mockOnSelect = jest.fn();
const mockDataSource = jest.fn()
const asyncTest = () => {
render(
<DataSelect
Expand Down
121 changes: 61 additions & 60 deletions test/mocks/mockData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2189,66 +2189,6 @@ export const mockDatabaseQuery = {
},
};

export const mockMVquery = {
"data": {
"ok": true,
"resp": {
"status": "SUCCESS",
"schema": [
{
"name": "materialized_view_name",
"type": "string"
}
],
"datarows": [
[
"http_count_view"
]
],
"total": 1,
"size": 1
}
}
}


export const mockTableQuery = {
"data": {
"ok": true,
"resp": {
"status": "SUCCESS",
"schema": [
{
"name": "namespace",
"type": "string"
},
{
"name": "tableName",
"type": "string"
},
{
"name": "isTemporary",
"type": "boolean"
}
],
"datarows": [
[
"default",
"http_logs",
false
],
[
"default",
"http_logs2",
false
]
],
"total": 2,
"size": 2
}
}
}

export const mockOpenSearchTreeQuery = {
data: {
ok: true,
Expand Down Expand Up @@ -2397,4 +2337,65 @@ export const mockDataSelectQuery = {
}
]
}
}


export const mockMVquery = {
"data": {
"ok": true,
"resp": {
"status": "SUCCESS",
"schema": [
{
"name": "materialized_view_name",
"type": "string"
}
],
"datarows": [
[
"http_count_view"
]
],
"total": 1,
"size": 1
}
}
}


export const mockTableQuery = {
"data": {
"ok": true,
"resp": {
"status": "SUCCESS",
"schema": [
{
"name": "namespace",
"type": "string"
},
{
"name": "tableName",
"type": "string"
},
{
"name": "isTemporary",
"type": "boolean"
}
],
"datarows": [
[
"default",
"http_logs",
false
],
[
"default",
"http_logs2",
false
]
],
"total": 2,
"size": 2
}
}
}

0 comments on commit 5cefec0

Please sign in to comment.