Skip to content

Commit

Permalink
fix(tests): start app in certain scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Oct 14, 2023
1 parent af274a1 commit fbd7bc3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Sitko.Core.Configuration.Vault.Tests/BaseVaultTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ protected override IHostApplicationBuilder ConfigureApplication(IHostApplication
{
options.Secrets = new List<string> { "NonExistingSecret" };
});

public override async Task OnCreatedAsync()
{
await base.OnCreatedAsync();
await StartApplicationAsync();
}
}

public class VaultTestScopeWithValidationFailure : VaultTestScope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ protected override IHostApplicationBuilder ConfigureApplication(IHostApplication
moduleOptions.Database = name;
});

public override async Task OnCreatedAsync()
{
await base.OnCreatedAsync();
await StartApplicationAsync();
}

protected override async Task OnDisposeAsync()
{
await base.OnDisposeAsync();
Expand Down

0 comments on commit fbd7bc3

Please sign in to comment.