1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 20:59:30 +00:00

Add sessions table to cleanDb in test data

This commit is contained in:
2022-02-25 14:24:43 +00:00
parent 440587b57e
commit 2fac6e7aba

View File

@@ -485,7 +485,10 @@ const data = {
async function cleanDb(dbConnectionPool) {
// Remove records from tables in reverse order to which they depend on
// each other
for (const table of Object.keys(data).reverse())
const tables = Object.keys(data).reverse();
tables.push('sessions');
for (const table of tables)
await dbConnectionPool.runQuery(`DELETE FROM ${table};`);
}