Skip to content
Snippets Groups Projects

cmd/gitserver/server: Extract arg to conf.Cached into a func for testability

Merged Administrator requested to merge ig/make-tlsexternal-func into main

Created by: indradhanush

Making this into a function allows us to test the code to guarantee that multiple certificates configured in the config are written into the SSLCAInfo file correctly.

Also we don't need the type hint anymore since the type is now inferred from the return type of the function itself. Which makes the code easier to read.

Change inspiration out of looking into https://github.com/sourcegraph/customer/issues/1136 and https://github.com/sourcegraph/sourcegraph/issues/38128 respectively this week.

Test plan

Added a test case.

Merge request reports

Merged by avatar (Jul 6, 2025 1:44pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading