mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
* Emit action events with updated schema * Fix collections service consistency * Pass action event upstream for createMany item * Pass action event upstream when processing payload * Skip unnecessary retrival of updated schema * Fix folder tests * Fields service consistency * Prevent duplicate cache clearing when deleting fields * Add tests_extensions_log table * Update collections crud tests * Add fields crud tests * Add action verify schema tests * Bypass system cache purge in relations service * Bypass system cache purge in nested field deletion * Update source for consistency when creating from collection
32 lines
756 B
TypeScript
32 lines
756 B
TypeScript
import vendors from '@common/get-dbs-to-test';
|
|
import { CreateCollection, DeleteCollection, PRIMARY_KEY_TYPES } from '@common/index';
|
|
|
|
export const collection = 'test_fields_crud';
|
|
|
|
export const seedDBStructure = () => {
|
|
it.each(vendors)(
|
|
'%s',
|
|
async (vendor) => {
|
|
for (const pkType of PRIMARY_KEY_TYPES) {
|
|
try {
|
|
const localCollection = `${collection}_${pkType}`;
|
|
|
|
// Delete existing collections
|
|
await DeleteCollection(vendor, { collection: localCollection });
|
|
|
|
// Create countries collection
|
|
await CreateCollection(vendor, {
|
|
collection: localCollection,
|
|
primaryKeyType: pkType,
|
|
});
|
|
|
|
expect(true).toBeTruthy();
|
|
} catch (error) {
|
|
expect(error).toBeFalsy();
|
|
}
|
|
}
|
|
},
|
|
300000
|
|
);
|
|
};
|