libstore: make FileTransfer injectable into HttpBinaryCacheStore#15206
Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom Feb 12, 2026
Merged
libstore: make FileTransfer injectable into HttpBinaryCacheStore#15206Ericson2314 merged 1 commit intoNixOS:masterfrom
FileTransfer injectable into HttpBinaryCacheStore#15206Ericson2314 merged 1 commit intoNixOS:masterfrom
Conversation
f1562fa to
39259b6
Compare
xokdvium
reviewed
Feb 11, 2026
xokdvium
reviewed
Feb 11, 2026
src/libstore-test-support/include/nix/store/tests/https-store.hh
Outdated
Show resolved
Hide resolved
xokdvium
reviewed
Feb 11, 2026
|
|
||
| namespace nix { | ||
|
|
||
| const std::filesystem::path & nixConfDir(); |
Member
There was a problem hiding this comment.
In a setting's default value. Once the setting info is in the .cc not header, this will go away.
Member
There was a problem hiding this comment.
Somewhere in #5638 this is covered as a desiderata for new settings system.
Ericson2314
reviewed
Feb 11, 2026
39259b6 to
bfb5713
Compare
bfb5713 to
747d1d0
Compare
Ericson2314
reviewed
Feb 11, 2026
747d1d0 to
9bea619
Compare
Ericson2314
reviewed
Feb 11, 2026
Ericson2314
reviewed
Feb 11, 2026
Ericson2314
reviewed
Feb 11, 2026
Ericson2314
reviewed
Feb 11, 2026
39dc405 to
8172af5
Compare
Ericson2314
approved these changes
Feb 11, 2026
8172af5 to
00135bf
Compare
Ericson2314
reviewed
Feb 12, 2026
This commit makes `FileTransfer` self-contained by giving it a reference to `FileTransferSettings` instead of reading from the global. It also adds an optional `FileTransfer` parameter to `HttpBinaryCacheStore` so callers can inject their own instance. The main motivation is test isolation. The HTTPS store tests now create custom `FileTransferSettings` with the test CA certificate and pass it through `makeFileTransfer()`, avoiding global state mutation entirely.
00135bf to
403e30f
Compare
Ericson2314
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This commit makes
FileTransferself-contained by giving it a reference toFileTransferSettingsinstead of reading from the global. It also adds an optionalFileTransferparameter toHttpBinaryCacheStoreso callers can inject their own instance.The main motivation is test isolation. The HTTPS store tests now create custom
FileTransferSettingswith the test CA certificate and pass it throughmakeFileTransfer(), avoiding global state mutation entirely.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.