mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
Use unique sqlite file for every E2E test
Previously, this lead to locking errors, when multiple test runners accessed the same database and tried to clear it or tried to insert new test data. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
ff0651e659
commit
4f60a79e4b
2 changed files with 3 additions and 4 deletions
|
@ -25,7 +25,7 @@ describe('Notes', () => {
|
||||||
MediaModule,
|
MediaModule,
|
||||||
TypeOrmModule.forRoot({
|
TypeOrmModule.forRoot({
|
||||||
type: 'sqlite',
|
type: 'sqlite',
|
||||||
database: './hedgedoc-e2e.sqlite',
|
database: './hedgedoc-e2e-media.sqlite',
|
||||||
autoLoadEntities: true,
|
autoLoadEntities: true,
|
||||||
dropSchema: true,
|
dropSchema: true,
|
||||||
synchronize: true,
|
synchronize: true,
|
||||||
|
|
|
@ -23,9 +23,10 @@ describe('Notes', () => {
|
||||||
GroupsModule,
|
GroupsModule,
|
||||||
TypeOrmModule.forRoot({
|
TypeOrmModule.forRoot({
|
||||||
type: 'sqlite',
|
type: 'sqlite',
|
||||||
database: './hedgedoc-e2e.sqlite',
|
database: './hedgedoc-e2e-notes.sqlite',
|
||||||
autoLoadEntities: true,
|
autoLoadEntities: true,
|
||||||
synchronize: true,
|
synchronize: true,
|
||||||
|
dropSchema: true,
|
||||||
}),
|
}),
|
||||||
LoggerModule,
|
LoggerModule,
|
||||||
],
|
],
|
||||||
|
@ -34,8 +35,6 @@ describe('Notes', () => {
|
||||||
app = moduleRef.createNestApplication();
|
app = moduleRef.createNestApplication();
|
||||||
await app.init();
|
await app.init();
|
||||||
notesService = moduleRef.get(NotesService);
|
notesService = moduleRef.get(NotesService);
|
||||||
const noteRepository = moduleRef.get('NoteRepository');
|
|
||||||
noteRepository.clear();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`POST /notes`, async () => {
|
it(`POST /notes`, async () => {
|
||||||
|
|
Loading…
Reference in a new issue