ci: Simplify DB truncate in tests (no-changelog) (#5243)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-01-25 10:02:28 +01:00
committed by GitHub
parent 0c70a40317
commit ac460aa841
6 changed files with 22 additions and 188 deletions

View File

@@ -675,20 +675,6 @@ export async function isInstanceOwnerSetUp() {
// misc
// ----------------------------------
/**
* Categorize array items into two groups based on whether they pass a test.
*/
export const categorize = <T>(arr: T[], test: (str: T) => boolean) => {
return arr.reduce<{ pass: T[]; fail: T[] }>(
(acc, cur) => {
test(cur) ? acc.pass.push(cur) : acc.fail.push(cur);
return acc;
},
{ pass: [], fail: [] },
);
};
export function getPostgresSchemaSection(
schema = config.getSchema(),
): PostgresSchemaSection | null {