tlsconfig: make root pool tests deterministic across platforms#154
Open
thaJeztah wants to merge 3 commits intodocker:mainfrom
Open
tlsconfig: make root pool tests deterministic across platforms#154thaJeztah wants to merge 3 commits intodocker:mainfrom
thaJeztah wants to merge 3 commits intodocker:mainfrom
Conversation
d682d12 to
8927b61
Compare
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The existing tests relied on x509.SystemCertPool behaving as a regular in-memory cert pool. This assumption only holds on Linux; on macOS and Windows the pool delegates to platform APIs, leading to non-deterministic behavior and test failures. Refactor tests to: - inject a fake "system" cert pool backed by generated test roots - verify leaf certificates instead of root certificates - avoid reliance on host trust stores This makes the tests portable and deterministic while still validating the intended semantics of ExclusiveRootPools. Note: real system pool behavior remains platform-dependent and would ideally be covered by integration tests. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
8927b61 to
b4454a6
Compare
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.
TestConfigServerExclusiveRootPoolsis broken on Windows / MacOS builds #105tlsconfig: make root pool tests deterministic across platforms
The existing tests relied on x509.SystemCertPool behaving as a
regular in-memory cert pool. This assumption only holds on Linux;
on macOS and Windows the pool delegates to platform APIs, leading
to non-deterministic behavior and test failures.
Refactor tests to:
This makes the tests portable and deterministic while still
validating the intended semantics of ExclusiveRootPools.
Note: real system pool behavior remains platform-dependent and
would ideally be covered by integration tests.
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)