Skip to content

Commit dc9de52

Browse files
committed
feat: update tests
Signed-off-by: Ruben Romero Montes <[email protected]>
1 parent d24ac1a commit dc9de52

File tree

11 files changed

+9924
-9648
lines changed

11 files changed

+9924
-9648
lines changed

test/it/end-to-end.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ suite('Integration Tests', () => {
5353
let pomPath = `test/it/test_manifests/${packageManager}/${manifestName}`
5454
let providedDataForStack = await index.stackAnalysis(pomPath)
5555
console.log(JSON.stringify(providedDataForStack,null , 4))
56-
let providers = ["tpa"]
56+
let providers = ["rhtpa"]
5757
providers.forEach(provider => expect(extractTotalsGeneralOrFromProvider(providedDataForStack, provider)).greaterThan(0))
5858
// TODO: if sources doesn't exist, add "scanned" instead
5959
// python transitive count for stack analysis is awaiting fix in exhort backend
@@ -85,7 +85,7 @@ suite('Integration Tests', () => {
8585
reportParsedFromHtml = JSON.parse("{" + startOfJson.substring(0,startOfJson.indexOf("};") + 1))
8686
reportParsedFromHtml = reportParsedFromHtml.report
8787
} finally {
88-
parsedStatusFromHtmlOsvNvd = reportParsedFromHtml.providers["tpa"].status
88+
parsedStatusFromHtmlOsvNvd = reportParsedFromHtml.providers["osv"].status
8989
expect(parsedStatusFromHtmlOsvNvd.code).equals(200)
9090
parsedScannedFromHtml = reportParsedFromHtml.scanned
9191
expect( typeof html).equals("string")
@@ -102,7 +102,7 @@ suite('Integration Tests', () => {
102102

103103
expect(analysisReport.scanned.total).greaterThan(0)
104104
expect(analysisReport.scanned.transitive).equal(0)
105-
let providers = ["tpa"]
105+
let providers = ["rhtpa"]
106106
providers.forEach(provider => expect(extractTotalsGeneralOrFromProvider(analysisReport, provider)).greaterThan(0))
107107
providers.forEach(provider => expect(analysisReport.providers[provider].status.code).equals(200))
108108
}).timeout(20000);

test/it/test_manifests/go/go.sum

Lines changed: 301 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,27 @@
11
{
2-
"bomFormat": "CycloneDX",
3-
"specVersion": "1.4",
4-
"version": 1,
5-
"metadata": {
6-
"timestamp": "2023-08-07T00:00:00.000Z",
7-
"component": {
8-
"group": "github.com/sample",
9-
"name": "empty-module",
10-
"version": "v0.0.0",
11-
"purl": "pkg:golang/github.com/sample/[email protected]",
12-
"type": "application",
13-
"bom-ref": "pkg:golang/github.com/sample/[email protected]"
14-
}
15-
},
16-
"components": [
17-
{
18-
"group": "github.com/sample",
19-
"name": "empty-module",
20-
"version": "v0.0.0",
21-
"purl": "pkg:golang/github.com/sample/[email protected]",
22-
"type": "application",
23-
"bom-ref": "pkg:golang/github.com/sample/[email protected]"
2+
"bomFormat": "CycloneDX",
3+
"specVersion": "1.4",
4+
"version": 1,
5+
"metadata": {
6+
"timestamp": "2023-08-07T00:00:00.000Z",
7+
"component": {
8+
"group": "github.com/sample",
9+
"name": "empty-module",
10+
"version": "v0.0.0",
11+
"purl": "pkg:golang/github.com/sample/[email protected]",
12+
"type": "application",
13+
"bom-ref": "pkg:golang/github.com/sample/[email protected]"
14+
}
2415
},
25-
{
26-
"name": "go",
27-
"version": "1.24",
28-
"purl": "pkg:golang/[email protected]",
29-
"type": "library",
30-
"bom-ref": "pkg:golang/[email protected]"
31-
},
32-
{
33-
"name": "toolchain",
34-
"version": "go1.24",
35-
"purl": "pkg:golang/[email protected]",
36-
"type": "library",
37-
"bom-ref": "pkg:golang/[email protected]"
38-
}
39-
],
40-
"dependencies": [
41-
{
42-
"ref": "pkg:golang/[email protected]",
43-
"dependsOn": [
44-
"pkg:golang/[email protected]"
45-
]
46-
},
47-
{
48-
"ref": "pkg:golang/[email protected]",
49-
"dependsOn": []
50-
}
51-
]
16+
"components": [
17+
{
18+
"group": "github.com/sample",
19+
"name": "empty-module",
20+
"version": "v0.0.0",
21+
"purl": "pkg:golang/github.com/sample/[email protected]",
22+
"type": "application",
23+
"bom-ref": "pkg:golang/github.com/sample/[email protected]"
24+
}
25+
],
26+
"dependencies": []
5227
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/sample/empty-module
22

3-
go 1.24
3+
go 1.20

0 commit comments

Comments
 (0)