mirror of
https://github.com/azaion/missions.git
synced 2026-06-21 08:11:06 +00:00
Enhance test infrastructure and configuration for JWKS and Docker setup
ci/woodpecker/push/build-arm Pipeline was successful
ci/woodpecker/push/build-arm Pipeline was successful
- Updated Azaion.Missions.csproj to exclude test sources from service compilation, preventing build failures due to test project dependencies. - Modified docker-compose.test.yml to preload the pg_stat_statements extension for testing and adjusted JWT refresh intervals for better test execution timing. - Enhanced Dockerfile to install wget for health checks and ensure proper initialization of the container. - Introduced a test-only endpoint for JWKS refresh to facilitate end-to-end testing without relying on the default refresh intervals. - Updated DTOs in ApiDtos.cs to reflect camelCase naming conventions for consistency with service responses. - Improved test cases to handle JWKS rotation and refresh scenarios effectively, ensuring robust validation of JWT handling. This commit lays the groundwork for more reliable and efficient testing of the Azaion.Missions project.
This commit is contained in:
@@ -52,6 +52,11 @@ public static class JwtExtensions
|
||||
if (refreshSeconds is int refreshSec)
|
||||
jwksConfigManager.RefreshInterval = TimeSpan.FromSeconds(refreshSec);
|
||||
|
||||
// Singleton so the (otherwise hidden) cache can be triggered from a
|
||||
// test-only endpoint when ASPNETCORE_ENVIRONMENT=Test. Production
|
||||
// never resolves it because the endpoint is not mapped.
|
||||
services.AddSingleton<IConfigurationManager<JsonWebKeySet>>(jwksConfigManager);
|
||||
|
||||
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||
.AddJwtBearer(options =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user