CycloneDX / cyclonedx-rust-cargo

Creates CycloneDX Software Bill of Materials (SBOM) from Rust (Cargo) projects
https://cyclonedx.org/
Apache License 2.0
106 stars 44 forks source link

`cargo cyclonedx` tests fail after upgrading to `purl` 0.1.3 #745

Closed Shnatsel closed 4 months ago

Shnatsel commented 4 months ago

The tests for cargo cyclonedx fail after upgrading purl from 0.1.2 to 0.1.3:

failures:

---- purl::tests::git_purl stdout ----
thread 'purl::tests::git_purl' panicked at cargo-cyclonedx/src/purl.rs:129:9:
assertion `left == right` failed
  left: "git%2Bhttps%3A%2F%2Fgithub.com%2Frust-secure-code%2Fcargo-auditable.git%40da85607fb1a09435d77288ccf05a92b2e8ec3f71"
 right: "git+https://github.com/rust-secure-code/cargo-auditable.git@da85607fb1a09435d77288ccf05a92b2e8ec3f71"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- purl::tests::local_package stdout ----
thread 'purl::tests::local_package' panicked at cargo-cyclonedx/src/purl.rs:223:9:
assertion `left == right` failed
  left: "file://%2Fhome%2Fshnatsel%2FCode%2Fcargo-cyclonedx%2Fcyclonedx-bom"
 right: "file:///home/shnatsel/Code/cargo-cyclonedx/cyclonedx-bom"

---- purl::tests::toplevel_package_with_subpath stdout ----
thread 'purl::tests::toplevel_package_with_subpath' panicked at cargo-cyclonedx/src/purl.rs:176:9:
assertion `left == right` failed
  left: "src/%D0%BA%D0%B8%D1%80%D0%B8%D0%BB%D0%BB%D0%B8%D1%86%D0%B0/lib.rs"
 right: "src/кириллица/lib.rs"

---- purl::tests::workspace_package stdout ----
thread 'purl::tests::workspace_package' panicked at cargo-cyclonedx/src/purl.rs:199:9:
assertion `left == right` failed
  left: "file://..%2Fcyclonedx-bom"
 right: "file://../cyclonedx-bom"