-
Notifications
You must be signed in to change notification settings - Fork 3
[Tests] AISettingsProvider — test DB→config→env→throw fallback chain #103
Copy link
Copy link
Open
Labels
Milestone
Description
What to build
AISettingsProvider.GetAISettingsAsync() contains non-trivial fallback logic (DB Settings → IConfiguration → environment variable → throw) with zero tests. Add unit tests for each branch.
Acceptance criteria
- Test: API key found in DB
Settings.AiApiKey→ returned successfully - Test: DB key absent → falls back to
IConfigurationvalue → returned successfully - Test: DB + config absent → falls back to environment variable → returned successfully
- Test: all three sources absent → throws expected exception
- Mocks use
IDataStorageServiceandIConfiguration(no real infrastructure needed) - All new tests pass in CI
Blocked by
None — can start immediately.
Priority
🔴 Critical — fallback logic is critical for configuration correctness
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Projects
Status
No status