Template
chore: deploy initial code base
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
||||
using Strata.ContinuousImprovement.Biz.DbContexts;
|
||||
using Strata.ContinuousImprovement.Client.Test.Integration.Setup;
|
||||
using Strata.ContinuousImprovement.Client.Test.Integration.Tests;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[ExcludeFromCodeCoverage]
|
||||
[SetUpFixture]
|
||||
public class ClientIntegrationTestFixture
|
||||
{
|
||||
[OneTimeSetUp]
|
||||
public virtual async Task SetDbContextAndServices()
|
||||
{
|
||||
#if DEBUG
|
||||
//When running locally sets the profile to the CI profile so you have access to resources
|
||||
Environment.SetEnvironmentVariable("AWS_Profile", "sdt-continuous-improvement-service-role");
|
||||
#endif
|
||||
var clientService = new ClientServiceBase();
|
||||
await clientService.ClientValidation();
|
||||
var services = ServiceCollectionFactory.Create();
|
||||
await services.SetupServiceProperties(clientService.StrataId);
|
||||
}
|
||||
|
||||
[OneTimeTearDown]
|
||||
public async Task TearDown()
|
||||
{
|
||||
try
|
||||
{
|
||||
var centralDbContext = ServiceProperties.CentralDbContext as CentralDbContext;
|
||||
if (centralDbContext == null) { return; }
|
||||
_ = await centralDbContext.Database.EnsureDeletedAsync(CancellationToken.None);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user