mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 23:56:00 +00:00
added deploy test
This commit is contained in:
@@ -428,6 +428,18 @@ describe('Deploy database', () => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const T2 = {
|
||||||
|
name: 't2.table.yaml',
|
||||||
|
json: {
|
||||||
|
name: 't2',
|
||||||
|
columns: [
|
||||||
|
{ name: 'id', type: 'int' },
|
||||||
|
{ name: 'val', type: 'int' },
|
||||||
|
],
|
||||||
|
primaryKey: ['id'],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
const T1_DELETED = {
|
const T1_DELETED = {
|
||||||
name: '_deleted_t1.table.yaml',
|
name: '_deleted_t1.table.yaml',
|
||||||
json: {
|
json: {
|
||||||
@@ -686,4 +698,15 @@ describe('Deploy database', () => {
|
|||||||
expect(res5.rows[0].run_count == 2).toBeTruthy();
|
expect(res5.rows[0].run_count == 2).toBeTruthy();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
test.each(engines.map(engine => [engine.label, engine]))(
|
||||||
|
'Mark table removed, one remains - %s',
|
||||||
|
testWrapper(async (conn, driver, engine) => {
|
||||||
|
await testDatabaseDeploy(engine, conn, driver, [[T1, T2], [T2], [T2]], {
|
||||||
|
markDeleted: true,
|
||||||
|
disallowExtraObjects: true,
|
||||||
|
finalCheckAgainstModel: [T1_DELETED, T2],
|
||||||
|
});
|
||||||
|
})
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user