test: add Rust resolver tests using real orjson witness paths#12
test: add Rust resolver tests using real orjson witness paths#12Sandipmandal25 wants to merge 1 commit intoSBOMit:masterfrom
Conversation
Signed-off-by: Sandipmandal25 <sandipmandal02.sm@gmail.com>
|
Hi @Sandipmandal25! Thanks for putting the effort into writing these tests. I just wanted to give a quick heads up that I actually opened PR #8 yesterday, which aims to solve the exact same issue by adding the missing unit tests for the Rust resolver. Since our PRs are covering the same ground and #8 was opened a bit earlier, would you mind taking a look at my PR to see if it covers everything you had in mind here? If I missed anything, I’d be happy to collaborate and incorporate your feedback over there so we can consolidate our efforts! Let me know what you think! |
I noticed PR #8 also adds Rust resolver tests. My PR covers some additional scenarios: compound hyphenated crate names like pyo3-build-config, underscore names like serde_derive, deduplication of multiple files from the same crate, and .crate files in registry cache all using real file paths from the KubeCon orjson witness attestation. what i discussed also yesterday . Happy to consolidate into whichever PR the maintainers prefer to merge then i will rebase it accordingly |
Hi @Sandipmandal25, thanks for outlining the specific scenarios you targeted! It looks like we ended up tackling the exact same problem independently. I actually opened PR #8 yesterday to resolve this, and it also covers these exact same edge cases (like the hyphenated/underscore names, file deduplication, and cache files). Since our solutions are completely aligned and achieve the exact same goal, there is no need for us to debate or duplicate efforts. I'm completely happy to just leave it in the hands of the maintainers to review at their convenience and decide which one they'd prefer to merge. Thanks for the contribution, and let's see what the maintainers advise! |
Description
The Rust resolver had zero test coverage despite being the most regex-heavy resolver in the codebase. This PR adds tests to verify correct behavior across the main resolution paths.
Changes Made
rust_test.gocovering:pyo3-build-config-0.27.1)serde_derive).cratefile resolution from registry cacheNormalizeRustCrateNamenormalization behaviorTesting
All 13 tests pass