Skip to content

Commit

Permalink
Update TackleTestapp binary tests
Browse files Browse the repository at this point in the history
* Move TackletestApp binary fomr TIER0

Proposing partially revert PR#161 Testapp Binary test assignment to TIER0 to unblock CI on-PR checks that are holding our colleagues work in Konveyor repos from being merged.

The original PR#161 moved TackleTestapp Public "binary" test into TIER0 however it was _still failing_. The issue is already reported as https://issues.redhat.com/browse/MTA-3654, so I'd strongly prefer escalate the Jira issue to merging failing test.

Signed-off-by: Marek Aufart <maufart@redhat.com>

* Update TackleTestapp binary tests

Updating test for Tackle Testapp Public Binary analysis and related test
data.

Related to konveyor#161,
konveyor#169, replaces konveyor#168

Signed-off-by: Marek Aufart <maufart@redhat.com>

* Update test_cases names

Signed-off-by: Marek Aufart <maufart@redhat.com>

---------

Signed-off-by: Marek Aufart <maufart@redhat.com>
  • Loading branch information
aufi authored and mguetta1 committed Sep 25, 2024
1 parent 0ad15eb commit 8b142f8
Show file tree
Hide file tree
Showing 9 changed files with 138 additions and 80 deletions.
2 changes: 1 addition & 1 deletion analysis/pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func DumpTags(t *testing.T, tc TC, app api.Application) {
fmt.Printf("## GOT TAGS FOR \"%s\":", tc.Name)
fmt.Printf("\n[]api.Tag{\n")
for _, tag := range tags {
fmt.Printf(" {Name: \"%s\", Category: api.Ref{Name: \"%s\")},\n", tag.Name, tag.Category.Name)
fmt.Printf(" {Name: \"%s\", Category: api.Ref{Name: \"%s\"}},\n", tag.Name, tag.Category.Name)
}
fmt.Printf("}\n")
}
2 changes: 1 addition & 1 deletion analysis/tc_acmeair_webapp_upload_binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/konveyor/tackle2-hub/api"
)

var AcmeairWebapp = TC{
var AcmeairWebappBinary = TC{
Name: "acmeair-webapp",
Application: data.UploadBinary,
Task: Analyze,
Expand Down
2 changes: 1 addition & 1 deletion analysis/tc_administracion_efectivo_upload_binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/konveyor/tackle2-hub/api"
)

var AdministracionEfectivo = TC{
var AdministracionEfectivoBinary = TC{
Name: "administracion-efectivo",
Application: data.UploadBinary,
Task: Analyze,
Expand Down
5 changes: 3 additions & 2 deletions analysis/tc_tackle_testapp_public_binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

var TackleTestappPublicBinary = TC{
Name: "tackle-testapp-binary",
Application: data.TackleTestappPublic,
Application: data.TackleTestappPublicBinary,
Identities: []api.Identity{
identity.MavenPublic,
identity.TackleTestappPublicMaven,
},
Task: Analyze,
Labels: addon.Labels{
Expand Down Expand Up @@ -94,6 +94,7 @@ var TackleTestappPublicBinary = TC{
},
},
AnalysisTags: []api.Tag{
{Name: "EJB XML", Category: api.Ref{Name: "Bean"}},
{Name: "Servlet", Category: api.Ref{Name: "HTTP"}},
{Name: "JNI", Category: api.Ref{Name: "Other"}},
{Name: "Servlet", Category: api.Ref{Name: "Connect"}},
Expand Down
2 changes: 1 addition & 1 deletion analysis/tc_tackle_testapp_public_deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var TackleTestappPublicWithDeps = TC{
},
},
Identities: []api.Identity{
identity.MavenPublic,
identity.TackleTestappPublicMaven,
},
Analysis: api.Analysis{
Effort: 3,
Expand Down
6 changes: 3 additions & 3 deletions analysis/test_cases.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ package analysis
var Tier0TestCases = []TC{
TackleTestappPublicWithDeps,
TackleTestappPublicPackageFilter,
AcmeairWebapp,
Tomcat,
TackleTestappPublicBinary,
AcmeairWebappBinary, // Binary upload
TackleTestappPublicBinary, // Binary fetched from tackle-testapp-public maven registry
}

// Tier 1 Analysis test cases - should work.
Expand All @@ -19,7 +19,7 @@ var Tier1TestCases = []TC{
// Tier 2 Analysis test cases - great if works.
// List of applications with expected analysis outputs.
var Tier2TestCases = []TC{
AdministracionEfectivo,
AdministracionEfectivoBinary, // Bug https://issues.redhat.com/browse/MTA-2606
Daytrader,
PetclinicHazelcast,
ApacheWicket,
Expand Down
18 changes: 13 additions & 5 deletions data/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ var (
Minimal = api.Application{
Name: "Minimal application",
}

// Repository-based applications
PathfinderGit = api.Application{
Name: "Pathfinder",
Description: "Tackle Pathfinder application.",
Expand All @@ -32,10 +34,6 @@ var (
Kind: "git",
URL: "https://github.com/konveyor/tackle-testapp-public",
},
Binary: "io.konveyor.demo:customers-tomcat:0.0.1-SNAPSHOT:war",
}
UploadBinary = api.Application{
Name: "upload-binary",
}
CustomerTomcatLegacy = api.Application{
Name: "Customer Tomcat Legacy",
Expand All @@ -45,5 +43,15 @@ var (
Path: "example-1",
},
}
ApplicationSamples = []api.Application{Minimal, PathfinderGit, BookServer, TackleTestappPublic, UploadBinary, CustomerTomcatLegacy}

// Binary applications
TackleTestappPublicBinary = api.Application{
Name: "Tackle Testapp public binary",
Binary: "mvn://io.konveyor.demo:customers-tomcat:0.0.1-SNAPSHOT:war", // To be downloaded from maven repository
}
UploadBinary = api.Application{
Name: "upload-binary", // The file itself to be uploaded during the test
}

ApplicationSamples = []api.Application{Minimal, PathfinderGit, BookServer, TackleTestappPublic, CustomerTomcatLegacy, TackleTestappPublicBinary, UploadBinary}
)
66 changes: 0 additions & 66 deletions data/identity/identity.go

This file was deleted.

115 changes: 115 additions & 0 deletions data/identity/maven.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
package identity

import (
"github.com/konveyor/tackle2-hub/api"
)

var TackleTestappPrivateMaven = api.Identity{
Kind: "maven",
Name: "maven-creds",
Settings: `<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>tackle-testapp</id>
<username>GITHUB_USER</username>
<password>GITHUB_TOKEN</password>
</server>
</servers>
<mirrors>
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:http:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<url>http://0.0.0.0/</url>
<blocked>true</blocked>
</mirror>
</mirrors>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>tackle-testapp</id>
<url>https://maven.pkg.github.com/konveyor/tackle-testapp</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
</settings>`,
}

var TackleTestappPublicMaven = api.Identity{
Kind: "maven",
Name: "maven-testapp-public-creds",
Settings: `<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>tackle-testapp-public</id>
<username>GITHUB_USER</username>
<password>GITHUB_TOKEN</password>
</server>
</servers>
<mirrors>
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:http:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<url>http://0.0.0.0/</url>
<blocked>true</blocked>
</mirror>
</mirrors>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>tackle-testapp-public</id>
<url>https://maven.pkg.github.com/konveyor/tackle-testapp-public</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
</settings>`,
}

0 comments on commit 8b142f8

Please sign in to comment.