This pull request introduces a new health check for storage initialization and includes related unit tests. Additionally, it updates project files to support these changes.
Update the title of the PR to be succinct and less than 65 characters
Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
Description
This pull request introduces a new health check for storage initialization and includes related unit tests. Additionally, it updates project files to support these changes.
New Features:
src/Microsoft.Health.Fhir.Api/Features/Health/StorageInitializedHealthCheck.cs
: Added a new health check classStorageInitializedHealthCheck
to monitor the initialization status of storage.Unit Tests:
src/Microsoft.Health.Fhir.Shared.Api.UnitTests/Features/Health/StorageInitializedHealthCheckTests.cs
: Added unit tests for theStorageInitializedHealthCheck
class to verify its behavior under different conditions.Project File Updates:
src/Microsoft.Health.Fhir.Api.UnitTests/Microsoft.Health.Fhir.R4.Api.UnitTests.csproj
: Added a conditional package reference forMicrosoft.Extensions.TimeProvider.Testing
when the target framework is notnet6.0
.src/Microsoft.Health.Fhir.Shared.Api.UnitTests/Microsoft.Health.Fhir.Shared.Api.UnitTests.projitems
: Included the new test fileStorageInitializedHealthCheckTests.cs
and removed an unused folder reference. [1] [2]Dependency Injection:
src/Microsoft.Health.Fhir.Shared.Api/Modules/FhirModule.cs
: RegisteredStorageInitializedHealthCheck
as a singleton service and added it to the health checks. [1] [2]Related issues
Addresses AB#130097
Testing
Describe how this change was tested.
FHIR Team Checklist
Semver Change (docs)
Patch