This repository contains application-level tests for Konveyor. That means test focusing on integration of multiple components and real-world Koveyor use-cases. Basic components tests should be placed and executed in their own repositories.
Test are organized in packages/directories by the high-level Konveyor features.
Tests require running Konveyor/MTA installation (e.g. Minikube works great for test development purposes).
Background for this test suite come from Hub API tests https://github.com/konveyor/tackle2-hub/pull/268.
There is a binding
package providing API client methods https://github.com/konveyor/tackle2-hub/tree/main/binding.
Feel free to follow application analysis integration test directory as an example.
More details at https://github.com/konveyor/ci
git clone https://github.com/aufi/go-konveyor-tests && cd go-konveyor-tests
$ make setup # start minikube&tackle using David's scripts - local env only
These tests can be executed against OpenShift cluster with Konveyor installed by setting KUBECONFIG
variable:
KUBECONFIG=<kubeconfig file>
NOTE: You might be required to download and import the certificate chain. Please see Hub API test README for more information.
Set $HUB_BASE_URL
environment variable to point to Konveyor installation before running tests. More options could be found in Hub API test README.
$ HUB_BASE_URL="http://<KONVEYOR_HOST>/hub" make test-tier0
Run test manually example:
$ export HUB_BASE_URL="http://`minikube ip`/hub"
$ go test -count=1 -v ./analysis/
To provide maximum information about the project functionality, tests were separated into three tiers. From core functionality to nice to haves.
Very basic and core functionality. A bug here would lead to mostly useless project. This tier should never fail. Examples: Hub API or a basic application analysis flow.
$ make test-tier0
Features of the project expected to work to satifly most of end-users expectations. Examples: real-world use cases of application analysis, Jira integrations or metrics.
$ make test-tier1
More advanced features like complex application analysis or some edge cases. This tier should be kept green, but a failure should not affect most of users.
$ make test-tier2
Tests involving credentials or private resources which are supplied as part of the test configuration. It should be excluded from PR runs and will be run through Jenkins.
$ make test-tier3
For debug output like printing full analysis results, set export DEBUG=1
.
For keep data created by test e.g. for debugging purposes, set export KEEP=1
.
For parallel test execution, set export PARALLEL=1
.
Note: When running tests, ensure that your configuration is set appropriately. Refer to the Configuration
struct in config/configuration.go
file for details on supported configuration variables.
Ensure that the required configuration variables are set as environment variables or added to config/config.json
file.
Refer to the README.md
files in each folder for test-specific configuration details.
Refer to Konveyor's Code of Conduct here.