diff --git a/__tests__/sbom.test.ts b/__tests__/sbom.test.ts
index 5afeaa7..f0fabf6 100644
--- a/__tests__/sbom.test.ts
+++ b/__tests__/sbom.test.ts
@@ -168,13 +168,13 @@ describe('sbom feature', () => {
type: 'library',
group: 'org.json',
name: 'json',
- version: '20211205',
- purl: 'pkg:maven/org.json/json@20211205',
- 'bom-ref': 'pkg:maven/org.json/json@20211205',
+ version: '20241224',
+ purl: 'pkg:maven/org.json/json@20241224',
+ 'bom-ref': 'pkg:maven/org.json/json@20241224',
properties: [
{
name: 'syft:cpe23',
- value: 'cpe:2.3:a:json:json:20211205:*:*:*:*:*:*:*'
+ value: 'cpe:2.3:a:json:json:20241224:*:*:*:*:*:*:*'
}
]
},
@@ -190,10 +190,10 @@ describe('sbom feature', () => {
dependencies: [
{
ref: 'pkg:maven/com.oracle/main-test-app@1.0-SNAPSHOT',
- dependsOn: ['pkg:maven/org.json/json@20211205']
+ dependsOn: ['pkg:maven/org.json/json@20241224']
},
{
- ref: 'pkg:maven/org.json/json@20211205',
+ ref: 'pkg:maven/org.json/json@20241224',
dependsOn: []
}
]
@@ -206,12 +206,12 @@ describe('sbom feature', () => {
'Found SBOM: ' + join(workspace, 'test.sbom.json')
)
expect(spyInfo).toHaveBeenCalledWith('=== SBOM Content ===')
- expect(spyInfo).toHaveBeenCalledWith('- pkg:maven/org.json/json@20211205')
+ expect(spyInfo).toHaveBeenCalledWith('- pkg:maven/org.json/json@20241224')
expect(spyInfo).toHaveBeenCalledWith(
'- pkg:maven/com.oracle/main-test-app@1.0-SNAPSHOT'
)
expect(spyInfo).toHaveBeenCalledWith(
- ' depends on: pkg:maven/org.json/json@20211205'
+ ' depends on: pkg:maven/org.json/json@20241224'
)
expect(spyWarning).not.toHaveBeenCalled()
})
@@ -277,13 +277,13 @@ describe('sbom feature', () => {
name: 'test.sbom.json',
resolved: expect.objectContaining({
json: expect.objectContaining({
- package_url: 'pkg:maven/org.json/json@20211205',
+ package_url: 'pkg:maven/org.json/json@20241224',
dependencies: []
}),
'main-test-app': expect.objectContaining({
package_url:
'pkg:maven/com.oracle/main-test-app@1.0-SNAPSHOT',
- dependencies: ['pkg:maven/org.json/json@20211205']
+ dependencies: ['pkg:maven/org.json/json@20241224']
})
})
})
diff --git a/__tests__/sbom/main-test-app/pom.xml b/__tests__/sbom/main-test-app/pom.xml
index 09390b1..ec9ae9f 100644
--- a/__tests__/sbom/main-test-app/pom.xml
+++ b/__tests__/sbom/main-test-app/pom.xml
@@ -9,15 +9,15 @@
1.0.0
- 11
- 11
+ 17
+ 17
org.json
json
- 20211205
+ 20241224
@@ -39,7 +39,6 @@
- sbom
com.oracle.sbom.SBOMTestApplication
-Ob
diff --git a/__tests__/sbom/main-test-app/verify-sbom.cmd b/__tests__/sbom/main-test-app/verify-sbom.cmd
index 88bd819..de5cd0c 100644
--- a/__tests__/sbom/main-test-app/verify-sbom.cmd
+++ b/__tests__/sbom/main-test-app/verify-sbom.cmd
@@ -1,14 +1,14 @@
@echo off
-cd target
+set "SCRIPT_DIR=%~dp0"
for %%p in (
- "\"pkg:maven/org.json/json@20211205\""
+ "\"pkg:maven/org.json/json@20241224\""
"\"main-test-app\""
"\"svm\""
"\"nativeimage\""
) do (
echo Checking for %%p
- findstr /c:%%p sbom.sbom.json || exit /b 1
+ findstr /c:%%p "%SCRIPT_DIR%target\main-test-app.sbom.json" || exit /b 1
)
echo SBOM was successfully generated and contained the expected components
\ No newline at end of file
diff --git a/__tests__/sbom/main-test-app/verify-sbom.sh b/__tests__/sbom/main-test-app/verify-sbom.sh
index a7bf08a..c9c2f7d 100644
--- a/__tests__/sbom/main-test-app/verify-sbom.sh
+++ b/__tests__/sbom/main-test-app/verify-sbom.sh
@@ -1,8 +1,8 @@
#!/bin/bash
-cd target
+script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
required_patterns=(
- '"pkg:maven/org.json/json@20211205"'
+ '"pkg:maven/org.json/json@20241224"'
'"main-test-app"'
'"svm"'
'"nativeimage"'
@@ -10,7 +10,7 @@ required_patterns=(
for pattern in "${required_patterns[@]}"; do
echo "Checking for $pattern"
- if ! grep -q "$pattern" sbom.sbom.json; then
+ if ! grep -q "$pattern" "$script_dir/target/main-test-app.sbom.json"; then
echo "Pattern not found: $pattern"
exit 1
fi