Skip to content

Commit

Permalink
More testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathanio123 committed Aug 22, 2024
1 parent 77ff989 commit e9fc6da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/Fusion.Summary.Api/Deployment/k8s/deployment-pr-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ spec:
value: "{{clientId}}"
- name: BuildNr
value: "{{buildNr}}"
- name: ConnectionStrings__SummaryDbContext
value: "{{dbConnectionString}}"
args:
- /server

Expand Down
13 changes: 10 additions & 3 deletions src/Fusion.Summary.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddHealthChecks()
.AddCheck("liveness", () => HealthCheckResult.Healthy())
.AddCheck("db", () => HealthCheckResult.Healthy(), tags: ["ready"]);
// TODO: Add a real health check, when database is added in deployment pipelines and PR pipelines
// .AddDbContextCheck<DatabaseContext>("db", tags: new[] { "ready" });
.AddCheck("db", () => HealthCheckResult.Healthy(), tags: ["ready"])
.AddDbContextCheck<SummaryDbContext>("db", tags: new[] { "ready" });

builder.Services
.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
Expand Down Expand Up @@ -118,6 +117,14 @@

#endregion Health probes

// TESTING
using var scope = app.Services.CreateScope();
var dbContext = scope.ServiceProvider.GetRequiredService<SummaryDbContext>();
Console.WriteLine(dbContext.Database.GetConnectionString());

// TESTING


app.Run();

/// <summary>
Expand Down

0 comments on commit e9fc6da

Please sign in to comment.