This repository contains application-level API test suite 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 the metrics integration tests 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 ./e2e/metrics/
To provide maximum information about the project functionality, tests were separated into four 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. Currently no tests are assigned to this tier.
$ make test-tier0
Features of the project expected to work to satifly most of end-users expectations. Currently runs the metrics tests.
$ make test-tier1
More advanced features and nice-to-haves. This tier should be kept green, but a failure should not affect most of users. Currently no tests are assigned to this tier.
$ 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. Currently runs the Jira integration and migration wave tests.
$ make test-tier3
Runs the upstream Hub API tests suite against a running Konveyor instance. It clones konveyor/tackle2-hub and executes its make test-api.
These tests are not part of any tier and are run separately.
$ make test-hub-api
For keep data created by test e.g. for debugging purposes, set export KEEP=1.
NOTE: Before running tests, ensure that the required configuration variables are set as environment variables
You can edit the configuration file go-konveyor-tests.config and run:
source go-konveyor-tests.config
Refer to the README.md files in each folder for test-specific configuration details.
Refer to Konveyor's Code of Conduct here.