Skip to content

Commit

Permalink
test: fix error on test
Browse files Browse the repository at this point in the history
The PR cockroachdb#90862 introduced an error on generated code.
This PR fixes the missing parameters used for tests.

Epic: None

Release note: None
  • Loading branch information
maryliag committed Nov 1, 2022
1 parent 399c054 commit 06e938e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const history = H.createHashHistory();
const withLoadingIndicator: DatabaseDetailsPageProps = {
loading: true,
loaded: false,
lastError: undefined,
name: randomName(),
tables: [],
viewMode: ViewMode.Tables,
Expand Down Expand Up @@ -61,6 +62,7 @@ const withLoadingIndicator: DatabaseDetailsPageProps = {
const withoutData: DatabaseDetailsPageProps = {
loading: false,
loaded: true,
lastError: null,
name: randomName(),
tables: [],
viewMode: ViewMode.Tables,
Expand Down Expand Up @@ -98,6 +100,7 @@ function createTable(): DatabaseDetailsPageDataTable {
details: {
loading: false,
loaded: true,
lastError: null,
columnCount: _.random(5, 42),
indexCount: _.random(1, 6),
userCount: roles.length,
Expand All @@ -112,6 +115,7 @@ function createTable(): DatabaseDetailsPageDataTable {
stats: {
loading: false,
loaded: true,
lastError: null,
replicationSizeInBytes: _.random(1000.0) * 1024 ** _.random(1, 2),
rangeCount: _.random(50, 500),
nodesByRegionString:
Expand All @@ -123,6 +127,7 @@ function createTable(): DatabaseDetailsPageDataTable {
const withData: DatabaseDetailsPageProps = {
loading: false,
loaded: true,
lastError: null,
name: randomName(),
tables: [createTable()],
viewMode: ViewMode.Tables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const withLoadingIndicator: DatabaseTablePageProps = {
details: {
loading: true,
loaded: false,
lastError: undefined,
createStatement: "",
replicaCount: 0,
indexNames: [],
Expand All @@ -41,12 +42,14 @@ const withLoadingIndicator: DatabaseTablePageProps = {
stats: {
loading: true,
loaded: false,
lastError: undefined,
sizeInBytes: 0,
rangeCount: 0,
},
indexStats: {
loading: true,
loaded: false,
lastError: undefined,
stats: [],
lastReset: moment("2021-09-04T13:55:00Z"),
},
Expand Down Expand Up @@ -74,6 +77,7 @@ const withData: DatabaseTablePageProps = {
details: {
loading: false,
loaded: true,
lastError: null,
createStatement: `
CREATE TABLE public.${name} (
id UUID NOT NULL,
Expand Down Expand Up @@ -102,6 +106,7 @@ const withData: DatabaseTablePageProps = {
stats: {
loading: false,
loaded: true,
lastError: null,
sizeInBytes: 44040192,
rangeCount: 4200,
nodesByRegionString:
Expand All @@ -110,6 +115,7 @@ const withData: DatabaseTablePageProps = {
indexStats: {
loading: false,
loaded: true,
lastError: null,
stats: [
{
totalReads: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const history = H.createHashHistory();
const withLoadingIndicator: DatabasesPageProps = {
loading: true,
loaded: false,
lastError: undefined,
automaticStatsCollectionEnabled: true,
databases: [],
sortSetting: {
Expand All @@ -46,6 +47,7 @@ const withLoadingIndicator: DatabasesPageProps = {
const withoutData: DatabasesPageProps = {
loading: false,
loaded: true,
lastError: null,
automaticStatsCollectionEnabled: true,
databases: [],
sortSetting: {
Expand All @@ -70,6 +72,7 @@ const withoutData: DatabasesPageProps = {
const withData: DatabasesPageProps = {
loading: false,
loaded: true,
lastError: null,
showNodeRegionsColumn: true,
automaticStatsCollectionEnabled: true,
sortSetting: {
Expand All @@ -80,6 +83,7 @@ const withData: DatabasesPageProps = {
return {
loading: false,
loaded: true,
lastError: null,
name: randomName(),
sizeInBytes: _.random(1000.0) * 1024 ** _.random(1, 2),
tableCount: _.random(5, 100),
Expand Down

0 comments on commit 06e938e

Please sign in to comment.