Skip to content

Commit

Permalink
Moved binary analysis to TIER0 (#161)
Browse files Browse the repository at this point in the history
Signed-off-by: Maayan Hadasi <mguetta@redhat.com>
  • Loading branch information
mguetta1 committed Aug 28, 2024
1 parent a1e6a5e commit d62b5f8
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 148 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ VENDOR_DIR ?= /tmp/konveyor-vendor
ARCH ?= amd64
JUNIT_REPORT_DIR ?= /tmp/junit-report

# Set MAVEN_TESTAPP_USER to the value of GITHUB_USER if GITHUB_USER is defined
MAVEN_TESTAPP_USER ?= $(GITHUB_USER)
MAVEN_TESTAPP_TOKEN ?= $(GITHUB_TOKEN)


# Setup local minikube with tackle - work in progress (TODO: enable auth)
# This is for local setup, CI uses shared github actions
setup:
Expand Down Expand Up @@ -48,9 +43,9 @@ test-tier2:

# TIER3
test-tier3:
TIER3=1 MAVEN_TESTAPP_USER='$(MAVEN_TESTAPP_USER)' MAVEN_TESTAPP_TOKEN='$(MAVEN_TESTAPP_TOKEN)' $(MAKE) test-analysis
$(MAKE) test-jira
$(MAKE) test-migrationwave
TIER3=1 $(MAKE) test-analysis

#
# Feature tests.
Expand Down
113 changes: 0 additions & 113 deletions analysis/tc_tackle_testapp_public.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"github.com/konveyor/tackle2-hub/api"
)

var TackleTestappPrivateBinary = TC{
var TackleTestappPublicBinary = TC{
Name: "tackle-testapp-binary",
Application: data.TackleTestapp,
Application: data.TackleTestappPublic,
Identities: []api.Identity{
identity.TackleTestappMaven,
identity.MavenPublic,
},
Task: Analyze,
Labels: addon.Labels{
Expand Down
10 changes: 4 additions & 6 deletions analysis/tc_tackle_testapp_public_deps.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package analysis

import (
"github.com/konveyor/go-konveyor-tests/data"
"github.com/konveyor/go-konveyor-tests/data/identity"
"github.com/konveyor/go-konveyor-tests/hack/addon"
"github.com/konveyor/tackle2-hub/api"
"github.com/konveyor/tackle2-hub/test/api/identity"
)

var MavenPublic = identity.Mvn

var TackleTestappPublicWithDeps = TC{
Name: "Tackle Testapp public with deps",
Application: TackleTestApp,
Application: data.TackleTestappPublic,
Task: Analyze,
WithDeps: true,
Labels: addon.Labels{
Expand All @@ -20,8 +19,7 @@ var TackleTestappPublicWithDeps = TC{
},
},
Identities: []api.Identity{
MavenPublic, // Tackle Testapp public Maven registry expects MAVEN_TESTAPP_USER and MAVEN_TESTAPP_TOKEN env variables.

identity.MavenPublic,
},
Analysis: api.Analysis{
Effort: 2,
Expand Down
11 changes: 2 additions & 9 deletions analysis/tc_tackle_testapp_public_package_filter.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
package analysis

import (
"github.com/konveyor/go-konveyor-tests/data"
"github.com/konveyor/go-konveyor-tests/hack/addon"
"github.com/konveyor/tackle2-hub/api"
)

var TackleTestAppPackageFilter = api.Application{
Name: "Tackle Testapp public",
Repository: &api.Repository{
Kind: "git",
URL: "https://github.com/konveyor/tackle-testapp-public",
},
}

var TackleTestappPublicPackageFilter = TC{
Name: "Tackle Testapp public with package filter",
Application: TackleTestApp,
Application: data.TackleTestappPublic,
Task: Analyze,
WithDeps: false,
Labels: addon.Labels{
Expand Down
3 changes: 1 addition & 2 deletions analysis/test_cases.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var Tier0TestCases = []TC{
TackleTestappPublicPackageFilter,
AcmeairWebapp,
Tomcat,
TackleTestappPublicBinary,
}

// Tier 1 Analysis test cases - should work.
Expand All @@ -19,7 +20,6 @@ var Tier1TestCases = []TC{
// List of applications with expected analysis outputs.
var Tier2TestCases = []TC{
AdministracionEfectivo,
TackleTestappPublic,
Daytrader,
PetclinicHazelcast,
ApacheWicket,
Expand All @@ -29,5 +29,4 @@ var Tier2TestCases = []TC{
// Tier 3 Analysis with credentials test cases - should work
// List of applications with expected analysis outputs.
var Tier3TestCases = []TC{
TackleTestappPrivateBinary, // Needs GITHUB_USER and GITHUB_TOKEN env variables with Read access to https://github.com/konveyor/tackle-testapp
}
10 changes: 5 additions & 5 deletions data/application_data.go → data/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ var (
URL: "https://github.com/ibraginsky/book-server",
},
}
TackleTestapp = api.Application{
Name: "tackle-testapp",
TackleTestappPublic = api.Application{
Name: "Tackle Testapp public",
Repository: &api.Repository{
Kind: "subversion",
URL: "https://github.com/konveyor/tackle-testapp",
Kind: "git",
URL: "https://github.com/konveyor/tackle-testapp-public",
},
Binary: "io.konveyor.demo:customers-tomcat:0.0.1-SNAPSHOT:war",
}
Expand All @@ -45,5 +45,5 @@ var (
Path: "example-1",
},
}
ApplicationSamples = []api.Application{Minimal, PathfinderGit, BookServer, TackleTestapp, UploadBinary, CustomerTomcatLegacy}
ApplicationSamples = []api.Application{Minimal, PathfinderGit, BookServer, TackleTestappPublic, UploadBinary, CustomerTomcatLegacy}
)
12 changes: 10 additions & 2 deletions data/identity/identity_data.go → data/identity/identity.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
package identity

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

var TackleTestappMaven = api.Identity{
// Tackle Testapp public Maven registry expects MAVEN_TESTAPP_USER and MAVEN_TESTAPP_TOKEN env variables.
// For more information, see: https://github.com/konveyor/tackle-testapp-public?tab=readme-ov-file#building-the-application
var MavenPublic = identity.Mvn


var TackleTestappPrivateMaven = api.Identity{
Kind: "maven",
Name: "maven-creds",
Settings: `<?xml version="1.0" encoding="UTF-8"?>
Expand Down
2 changes: 0 additions & 2 deletions go-konveyor-tests.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ export JIRA_SERVER_PASSWORD=""
export JIRA_SERVER_TOKEN=""

# Enviroment variebles needed for Tier3 Analysis test
export GITHUB_USER=""
export GITHUB_TOKEN=""

0 comments on commit d62b5f8

Please sign in to comment.