Merge pull request #27006 from backstage/rugvip/test-fix

events-backend: skip tests if postgres tests are skipped
This commit is contained in:
Patrik Oldsberg
2024-10-08 11:11:55 +02:00
committed by GitHub
2 changed files with 11 additions and 5 deletions
@@ -41,11 +41,14 @@ async function migrateUntilBefore(knex: Knex, target: string): Promise<void> {
jest.setTimeout(60_000);
describe('migrations', () => {
const databases = TestDatabases.create({
ids: ['POSTGRES_9', 'POSTGRES_13', 'POSTGRES_16'],
});
const databases = TestDatabases.create({
ids: ['POSTGRES_9', 'POSTGRES_13', 'POSTGRES_16'],
});
const maybeDescribe =
databases.eachSupportedId().length > 0 ? describe : describe.skip;
maybeDescribe('migrations', () => {
it.each(databases.eachSupportedId())(
'20240523100528_init.js, %p',
async databaseId => {
@@ -27,7 +27,10 @@ const databases = TestDatabases.create({
ids: ['POSTGRES_9', 'POSTGRES_13', 'POSTGRES_16'],
});
describe('DatabaseEventBusStore', () => {
const maybeDescribe =
databases.eachSupportedId().length > 0 ? describe : describe.skip;
maybeDescribe('DatabaseEventBusStore', () => {
it.each(databases.eachSupportedId())(
'should clean up old events, %p',
async databaseId => {