mirror of
https://github.com/aquasecurity/trivy.git
synced 2026-01-31 13:53:14 +08:00
46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
Test case: Workspace with version.workspace = true inheritance.
|
|
|
|
This test verifies that the analyzer correctly handles Cargo workspaces where
|
|
member packages inherit version from [workspace.package].
|
|
|
|
Structure:
|
|
- Root Cargo.toml: defines [workspace.package] with version = "2.0.0"
|
|
- app/Cargo.toml: member package using version.workspace = true
|
|
|
|
Expected behavior:
|
|
- Virtual workspace root should have RelationshipRoot with no name/version
|
|
- myapp should have RelationshipWorkspace with version "2.0.0" (inherited)
|
|
- serde should have RelationshipDirect
|
|
|
|
-- Cargo.lock --
|
|
# This file is automatically @generated by Cargo.
|
|
# It is not intended for manual editing.
|
|
version = 3
|
|
|
|
[[package]]
|
|
name = "myapp"
|
|
version = "2.0.0"
|
|
dependencies = [
|
|
"serde",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde"
|
|
version = "1.0.195"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02"
|
|
-- Cargo.toml --
|
|
[workspace.package]
|
|
version = "2.0.0"
|
|
|
|
[workspace]
|
|
members = ["app"]
|
|
-- app/Cargo.toml --
|
|
[package]
|
|
name = "myapp"
|
|
version.workspace = true
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
serde = "1.0"
|