mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -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
d42bc83e38
commit
26554f7168
2 changed files with 3 additions and 4 deletions
|
@ -25,7 +25,7 @@ describe('Notes', () => {
|
|||
MediaModule,
|
||||
TypeOrmModule.forRoot({
|
||||
type: 'sqlite',
|
||||
database: './hedgedoc-e2e.sqlite',
|
||||
database: './hedgedoc-e2e-media.sqlite',
|
||||
autoLoadEntities: true,
|
||||
dropSchema: true,
|
||||
synchronize: true,
|
||||
|
|
|
@ -23,9 +23,10 @@ describe('Notes', () => {
|
|||
GroupsModule,
|
||||
TypeOrmModule.forRoot({
|
||||
type: 'sqlite',
|
||||
database: './hedgedoc-e2e.sqlite',
|
||||
database: './hedgedoc-e2e-notes.sqlite',
|
||||
autoLoadEntities: true,
|
||||
synchronize: true,
|
||||
dropSchema: true,
|
||||
}),
|
||||
LoggerModule,
|
||||
],
|
||||
|
@ -34,8 +35,6 @@ describe('Notes', () => {
|
|||
app = moduleRef.createNestApplication();
|
||||
await app.init();
|
||||
notesService = moduleRef.get(NotesService);
|
||||
const noteRepository = moduleRef.get('NoteRepository');
|
||||
noteRepository.clear();
|
||||
});
|
||||
|
||||
it(`POST /notes`, async () => {
|
||||
|
|
Loading…
Reference in a new issue