LEGLINK-567: expose the vendor's signing key secret id on the facility response - #1793
Conversation
📝 WalkthroughWalkthroughThe tenant API now retrieves vendor signing-key secret IDs from facility configuration. Facility queries include vendor authentication data. Integration tests cover configured and absent signing-key values. ChangesVendor signing-key exposure
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
DotNet/Shared/Application/Services/TenantApiService.cs (1)
84-89: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd focused tests for
GetVendorSigningKeySecretId.The new public method must return the configured identifier and
nullwhen the vendor, authentication settings, or signing key is absent. The supplied integration tests callIFacilityQueries.GetAsync; they do not exercise thisTenantApiServicemethod or the no-vendor case. Add small xUnit tests with a mocked HTTP handler through Moq. Do not use live HTTP calls.As per path instructions, use focused xUnit tests and mocks for external communication.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@DotNet/Shared/Application/Services/TenantApiService.cs` around lines 84 - 89, Add focused xUnit tests for TenantApiService.GetVendorSigningKeySecretId using a Moq-backed mocked HTTP handler, without live HTTP calls. Cover returning the configured SigningKeySecretId and returning null when Vendor, Authentication, or SigningKeySecretId is absent; ensure the tests exercise TenantApiService rather than only IFacilityQueries.GetAsync.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@DotNet/Shared/Application/Services/TenantApiService.cs`:
- Around line 84-89: Add focused xUnit tests for
TenantApiService.GetVendorSigningKeySecretId using a Moq-backed mocked HTTP
handler, without live HTTP calls. Cover returning the configured
SigningKeySecretId and returning null when Vendor, Authentication, or
SigningKeySecretId is absent; ensure the tests exercise TenantApiService rather
than only IFacilityQueries.GetAsync.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 43041242-4234-4d6f-88c1-1cc8180df18c
📒 Files selected for processing (5)
DotNet/ServiceTests/IntegrationTests/Census/CensusIntegrationTestFixture.csDotNet/ServiceTests/IntegrationTests/Tenant/FacilityVendorAuthenticationTests.csDotNet/Shared/Application/Services/ITenantApiService.csDotNet/Shared/Application/Services/TenantApiService.csDotNet/Tenant/Business/Queries/FacilityQueries.cs
🛠️ Description of Changes
Expose the vendor's signing key secret id on the facility response - This makes it retrievable by the services that will need it, and stops there.
🧪 Testing Performed
Tested locally
🧑🔬 Unit Testing
📓 Documentation Updated
Please update any relevant sections in the project documentation that were impacted by the changes in the PR.
Summary by CodeRabbit
New Features
Tests