Skip to content

tests: better validation of APNS config - #219

Open
FrenchGithubUser wants to merge 1 commit into
mainfrom
tt/apns-config-validation-tests
Open

FrenchGithubUser wants to merge 1 commit into
mainfrom
tt/apns-config-validation-tests

Conversation

@FrenchGithubUser

@FrenchGithubUser FrenchGithubUser commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Makes the three direct-APNS settings (apns_key_file_path, apns_team_id, apns_key_id) optional only as a group: a partial configuration is now refused at startup with an error what's missing, instead of silently downgrading hedwig to FCM-only. Empty values count as unset.

Also changed how the bad APNS config tests were working since they were reading a file that made the test fail (expectedly) because the config file drifted from the schema, and not because we actually tested bad configuration.

SYN-166

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 53.84615% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.64%. Comparing base (2c2d090) to head (0f2843a).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/main.rs 0.00% 12 Missing ⚠️
src/settings.rs 77.77% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
- Coverage   89.13%   88.64%   -0.50%     
==========================================
  Files           9        9              
  Lines         598      625      +27     
==========================================
+ Hits          533      554      +21     
- Misses         65       71       +6     
Files with missing lines Coverage Δ
src/settings.rs 82.00% <77.77%> (-4.96%) ⬇️
src/main.rs 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c2d090...0f2843a. Read the comment docs.

@FrenchGithubUser

Copy link
Copy Markdown
Member Author

@famedly-agent review

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · 2 comments

Nothing blocking: 2 smaller findings.

⚠️ Not reviewed: tests/config-bad-apns.yaml (deleted)

⚪ 2 minor

  1. ⚪ Empty-string APNS settings count as configured, breaking FCM-only startup · src/settings.rs#L191
  2. ⚪ Partial APNS test's contains check cannot detect message misclassification · tests/settings.rs#L104
1 ruled out · why?

Every finding with its reasoning, what I checked and the full trace:
→ review log

famedly-agent f450a71ac630 · 15 min · full trace

Comment thread src/settings.rs Resolved
Comment thread tests/settings.rs Resolved
@FrenchGithubUser
FrenchGithubUser force-pushed the tt/apns-config-validation-tests branch from adfc265 to 813cb96 Compare October 28, 2026 13:42
@FrenchGithubUser
FrenchGithubUser marked this pull request as ready for review October 28, 2026 13:49
@FrenchGithubUser
FrenchGithubUser requested a review from a team as a code owner October 28, 2026 13:49
@FrenchGithubUser
FrenchGithubUser force-pushed the tt/apns-config-validation-tests branch from 813cb96 to ecbe240 Compare October 29, 2026 12:06
@FrenchGithubUser
FrenchGithubUser force-pushed the tt/apns-config-validation-tests branch from ecbe240 to 0f2843a Compare October 29, 2026 14:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant