Skip to content

Commit de3c717

Browse files
mguetta1aufi
andauthored
Add book-server app analysis test (#162) (#310)
* Add book-server app analysis test Adding book-server application analysis test with results verified by report generated in previous Tackle versions. * Update book-server witt deps * Update test tiers * Update to expect original 6.2 incidents * Move BookServer back to TIER1 * Update BookServer app from data and comment * Update Lombok dependency line number * Update to api.Insight * Update hub * Fix deps * Fix insights field name --------- Signed-off-by: Marek Aufart <[email protected]> Co-authored-by: Marek Aufart <[email protected]>
1 parent d57575b commit de3c717

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
package analysis
2+
3+
import (
4+
"github.com/konveyor/go-konveyor-tests/data"
5+
"github.com/konveyor/go-konveyor-tests/hack/addon"
6+
"github.com/konveyor/tackle2-hub/api"
7+
)
8+
9+
var BookServerVerified = TC{
10+
Name: "BookServer verified results",
11+
Application: data.BookServer,
12+
Task: Analyze,
13+
WithDeps: true,
14+
Labels: addon.Labels{
15+
Included: []string{
16+
"konveyor.io/target=cloud-readiness",
17+
"konveyor.io/target=linux",
18+
"konveyor.io/target=openjdk21",
19+
},
20+
},
21+
Analysis: api.Analysis{
22+
Effort: 9,
23+
Issues: []api.Issue{
24+
{
25+
Category: "mandatory",
26+
Description: "File system - Java IO",
27+
Effort: 1,
28+
RuleSet: "cloud-readiness",
29+
Rule: "local-storage-00001",
30+
Incidents: []api.Incident{
31+
{
32+
File: "/shared/source/book-server/src/main/java/com/telran/application/model/BookModel.java",
33+
Line: 14,
34+
Message: "An application running inside a container could lose access to a file in local storage.",
35+
},
36+
{
37+
File: "/shared/source/book-server/src/main/java/com/telran/application/model/BookModel.java",
38+
Line: 17,
39+
Message: "An application running inside a container could lose access to a file in local storage.",
40+
},
41+
{
42+
File: "/shared/source/book-server/src/main/java/com/telran/application/model/BookModel.java",
43+
Line: 29,
44+
Message: "An application running inside a container could lose access to a file in local storage.",
45+
},
46+
{
47+
File: "/shared/source/book-server/src/main/java/com/telran/application/model/BookModel.java",
48+
Line: 32,
49+
Message: "An application running inside a container could lose access to a file in local storage.",
50+
},
51+
},
52+
},
53+
{
54+
Category: "mandatory",
55+
Description: "The Lombok version is incompatible with Open JDK 17",
56+
Effort: 3,
57+
RuleSet: "openjdk17/openjdk11",
58+
Rule: "lombok-incompatibility-00001",
59+
Incidents: []api.Incident{
60+
{
61+
File: "/shared/source/book-server/pom.xml",
62+
Line: 31,
63+
Message: "Lombok supports Java 17 since version 1.18.22. The version of Lombok used in this project is too old and not compatible with Java 17. You should consider upgrading it.",
64+
},
65+
},
66+
},
67+
},
68+
},
69+
}

analysis/test_cases.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ var Tier0TestCases = []TC{
1515
// Tier 1 Analysis test cases - should work.
1616
// List of applications with expected analysis outputs.
1717
var Tier1TestCases = []TC{
18+
BookServerVerified,
1819
CoolstoreWithDepsQuarkus,
1920
AdministracionEfectivoBinary, // Binary upload
21+
2022
}
2123

2224
// Tier 2 Analysis test cases - great if works.
@@ -26,6 +28,6 @@ var Tier2TestCases = []TC{
2628
SeamBooking,
2729
}
2830

29-
// Tier 3 Analysis with credentials test cases - should work
31+
// Tier 3 Analysis test cases - should work and should be executed on internal/private infrastructure
3032
// List of applications with expected analysis outputs.
3133
var Tier3TestCases = []TC{}

0 commit comments

Comments
 (0)