SBOM: Ensure 'java-version' is persisted to post-run phase

This commit is contained in:
Joel Rudsberg
2025-03-03 11:00:17 +01:00
committed by Fabio Niephaus
parent 271a696e78
commit 3ca6fc3a8a
4 changed files with 50 additions and 43 deletions

View File

@@ -145,6 +145,7 @@ describe('sbom feature', () => {
writeFileSync(sbomPath, JSON.stringify(sbom, null, 2))
mockFindSBOM([sbomPath])
jest.spyOn(core, 'getState').mockReturnValue(javaVersion)
await processSBOM()
}
@@ -190,6 +191,10 @@ describe('sbom feature', () => {
]
}
it('should throw an error if setUpSBOMSupport was not called before processSBOM', async () => {
await expect(processSBOM()).rejects.toThrow('setUpSBOMSupport must be called before processSBOM')
})
it('should process SBOM and display components', async () => {
await setUpAndProcessSBOM(sampleSBOM)