console: fix e2e tests

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5557
GitOrigin-RevId: 5b07d94e7199b75546455e5702e6eaabfa5e1f7f
This commit is contained in:
Luca Restagno 2022-10-06 15:38:06 +02:00 committed by hasura-bot
parent ad53402d1d
commit b0569e0eb7
3 changed files with 38 additions and 12 deletions

View File

@ -196,3 +196,33 @@ const deleteRemoteSchema = (remoteSchemaName: string) => {
}
);
};
type DriverSpec = {
name: 'postgres';
helpers: {
createDB: (dbName: string) => void;
removeDB: (dbName: string) => void;
createTable: (tableName: string) => void;
createRemoteSchema: (remoteSchemaName: string) => void;
deleteRemoteSchema: (remoteSchemaName: string) => void;
deleteTable: (tableName: string) => void;
trackTable: (tableName: string) => void;
untrackTable: (tableName: string) => void;
};
};
const postgres: DriverSpec = {
name: 'postgres',
helpers: {
createDB,
removeDB,
createTable,
createRemoteSchema,
deleteRemoteSchema,
deleteTable,
trackTable,
untrackTable,
},
};
export { postgres };

View File

@ -1,13 +1,11 @@
import { getElementFromAlias } from '../../../helpers/eventHelpers';
import { replaceMetadata, resetMetadata } from '../../../helpers/metadata';
// import { postgres } from '../../data/manage-database/postgres.spec';
import { postgres } from '../../data/manage-database/postgres.spec';
// Temporarily skipped because of its flakiness, see: https://github.com/hasura/graphql-engine-mono/issues/5433
// TODO: Fix and restore it
describe.skip('check if remote schema relationships are displayed properly', () => {
describe('check if remote schema relationships are displayed properly', () => {
before(() => {
// create a table called destination_table
// postgres.helpers.createTable('destination_table');
postgres.helpers.createTable('destination_table');
// load stuff into the metadata
replaceMetadata({
@ -121,6 +119,6 @@ describe.skip('check if remote schema relationships are displayed properly', ()
resetMetadata();
// delete the table
// postgres.helpers.deleteTable('destination_table');
postgres.helpers.deleteTable('destination_table');
});
});

View File

@ -1,13 +1,11 @@
import { getElementFromAlias } from '../../../helpers/eventHelpers';
import { replaceMetadata, resetMetadata } from '../../../helpers/metadata';
// import { postgres } from '../../data/manage-database/postgres.spec';
import { postgres } from '../../data/manage-database/postgres.spec';
// Temporarily skipped because of its flakiness, see: https://github.com/hasura/graphql-engine-mono/issues/5433
// TODO: Fix and restore it
describe.skip('check if remote schema to db relationships are created properly', () => {
describe('check if remote schema to db relationships are created properly', () => {
before(() => {
// create a table called destination_table
// postgres.helpers.createTable('destination_table');
postgres.helpers.createTable('destination_table');
// load stuff into the metadata
replaceMetadata({
@ -87,6 +85,6 @@ describe.skip('check if remote schema to db relationships are created properly',
resetMetadata();
// delete the table
// postgres.helpers.deleteTable('destination_table');
postgres.helpers.deleteTable('destination_table');
});
});