fix: fix ci issues and update styles to remove ui elements
CI / backend (push) Successful in 6m11s
CI / frontend (push) Failing after 54s

This commit is contained in:
voltsrage
2026-08-11 20:33:23 +08:00
parent c871dc4842
commit f2eab26ad0
9 changed files with 85 additions and 30 deletions
@@ -9,17 +9,30 @@ public class ApiFixture : WebApplicationFactory<Program>, IAsyncLifetime
{
// Override configuration to point at a test database — never run tests against
// the development database; a botched rollback could corrupt seed data.
//
// Defaults assume Postgres/Redis are reachable on the host's loopback address
// (e.g. `docker compose up -d postgres redis` on a dev machine). CI runners that
// execute the test step inside its own job container (act_runner's default docker
// executor) can't reach ports published on the Docker *host* via "localhost" —
// set CONNECTIONSTRINGS__DEFAULTCONNECTION / REDIS__CONNECTIONSTRING (e.g. to
// host.docker.internal) in that environment to override.
protected override void ConfigureWebHost(IWebHostBuilder builder)
{
builder.UseEnvironment("Testing");
builder.ConfigureAppConfiguration((_, config) =>
{
var connectionString = Environment.GetEnvironmentVariable("CONNECTIONSTRINGS__DEFAULTCONNECTION")
?? "Host=localhost;Port=5437;Database=vigilcare_records_test;Username=postgres;Password=password";
var redisConnectionString = Environment.GetEnvironmentVariable("REDIS__CONNECTIONSTRING")
?? "localhost:6383,defaultDatabase=1,allowAdmin=true";
var fhirBaseUrl = Environment.GetEnvironmentVariable("FHIR__BASEURL")
?? "http://localhost/fhir";
config.AddInMemoryCollection(new Dictionary<string, string?>
{
["ConnectionStrings:DefaultConnection"] =
"Host=localhost;Port=5437;Database=vigilcare_records_test;Username=postgres;Password=password",
["Redis:ConnectionString"] = "localhost:6383,defaultDatabase=1,allowAdmin=true",
["Fhir:BaseUrl"] = "http://localhost/fhir"
["ConnectionStrings:DefaultConnection"] = connectionString,
["Redis:ConnectionString"] = redisConnectionString,
["Fhir:BaseUrl"] = fhirBaseUrl
});
});
}