Skip to content

Commit a3afdfe

Browse files
committed
test: test reproducing the issue 1535
This is the panic we see when using serde_yml for this specific case: ``` failures: sbom::issue_1535::not_really_clearly_defined test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 68 filtered out; finished in 4.51s ──── STDERR: trustify-module-fundamental::fundamental sbom::issue_1535::not_really_clearly_defined thread 'sbom::issue_1535::not_really_clearly_defined' panicked at /home/heliofrota/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f /libyml-0.0.5/src/scanner.rs:2798:17: String join would overflow memory bounds note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Cancelling due to test failure ──────────── Summary [ 4.526s] 1 test run: 0 passed, 1 failed, 422 skipped FAIL [ 4.517s] trustify-module-fundamental::fundamental sbom::issue_1535::not_really_clearly_defined error: test run failed ➜ trustify git:(test) ✗ ```
1 parent d6d37cb commit a3afdfe

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
use test_context::test_context;
2+
use test_log::test;
3+
use trustify_module_ingestor::service::Format;
4+
use trustify_test_context::TrustifyContext;
5+
6+
/// This is a test for issue #1535
7+
#[test_context(TrustifyContext)]
8+
#[test(tokio::test)]
9+
async fn not_really_clearly_defined(ctx: &TrustifyContext) -> Result<(), anyhow::Error> {
10+
let result = ctx
11+
.ingest_document_as("csaf/timeout/rhsa-2024_5363.json.xz", Format::SBOM)
12+
.await;
13+
14+
assert!(result.is_err());
15+
16+
Ok(())
17+
}

modules/fundamental/tests/sbom/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
mod cyclonedx;
44
mod details;
55
mod graph;
6+
mod issue_1535;
67
mod license;
78
mod reingest;
89
mod spdx;

0 commit comments

Comments
 (0)