mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(directory): ♻⚡ try rm-ing db init wait time in migrations test
This commit is contained in:
parent
a03b7428e0
commit
98ff6d9f8e
1 changed files with 0 additions and 5 deletions
|
|
@ -1,4 +1,3 @@
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using FilterLists.Directory.Infrastructure.Persistence.Queries.Context;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
|
@ -13,15 +12,11 @@ public async Task Migrate_DoesNotThrowException()
|
|||
{
|
||||
var exception = await Record.ExceptionAsync(async () =>
|
||||
{
|
||||
// allow time for db to init
|
||||
Thread.Sleep(5000);
|
||||
|
||||
const string connString = "Server=directory-db;Database=filterlists;Uid=filterlists;Pwd=filterlists;";
|
||||
var options = new DbContextOptionsBuilder<QueryDbContext>()
|
||||
.UseNpgsql(connString, m => m.MigrationsAssembly("FilterLists.Directory.Infrastructure.Migrations"))
|
||||
.EnableSensitiveDataLogging()
|
||||
.Options;
|
||||
|
||||
await using var context = new QueryDbContext(options);
|
||||
await context.Database.MigrateAsync();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue