Fix issues with Gitea using workers
This commit is contained in:
@@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using StackExchange.Redis;
|
||||
|
||||
public class ApiFixture : WebApplicationFactory<Program>, IAsyncLifetime
|
||||
@@ -40,16 +41,22 @@ public class ApiFixture : WebApplicationFactory<Program>, IAsyncLifetime
|
||||
["RabbitMq:Password"] = Environment.GetEnvironmentVariable("RabbitMq__Password") ?? "guest",
|
||||
["RabbitMq:PagingAckTimeoutMs"] = "5000",
|
||||
["RabbitMq:VirtualHost"] = "vigilcare_test",
|
||||
// Neutralize appsettings.Production.json if the process env was Production.
|
||||
["RabbitMq:UseSsl"] = "false",
|
||||
["Kafka:BootstrapServers"] =
|
||||
Environment.GetEnvironmentVariable("Kafka__BootstrapServers") ?? "localhost:9092",
|
||||
["Kafka:ReplicationFactor"] =
|
||||
Environment.GetEnvironmentVariable("Kafka__ReplicationFactor") ?? "1",
|
||||
["Kafka:SecurityProtocol"] =
|
||||
Environment.GetEnvironmentVariable("Kafka__SecurityProtocol") ?? "Plaintext",
|
||||
["Kafka:NotificationPublisherGroupId"] = "notification-publisher-integration-test",
|
||||
["Kafka:NotificationPublisherAutoOffsetReset"] = "Latest",
|
||||
["Elasticsearch:Uri"] =
|
||||
Environment.GetEnvironmentVariable("Elasticsearch__Uri") ?? "http://localhost:9200",
|
||||
["Minio:Endpoint"] =
|
||||
Environment.GetEnvironmentVariable("Minio__Endpoint") ?? "localhost:9005",
|
||||
["Minio:UseSSL"] =
|
||||
Environment.GetEnvironmentVariable("Minio__UseSSL") ?? "false",
|
||||
["Fhir:ApiKey"] = "dev-integration-key-change-in-production",
|
||||
["ApiKey:Gateway"] = GatewayAuthHelper.DevGatewayKey,
|
||||
});
|
||||
@@ -59,6 +66,9 @@ public class ApiFixture : WebApplicationFactory<Program>, IAsyncLifetime
|
||||
|
||||
builder.ConfigureServices(services =>
|
||||
{
|
||||
services.Configure<HostOptions>(o =>
|
||||
o.BackgroundServiceExceptionBehavior = BackgroundServiceExceptionBehavior.Ignore);
|
||||
|
||||
services.AddAuthentication(options =>
|
||||
{
|
||||
options.DefaultAuthenticateScheme = TestingAuthHandler.SchemeName;
|
||||
|
||||
Reference in New Issue
Block a user