This module contains the integration tests for the WSO2 APK. Following instructions will guide you to run or debug the integration tests.
If you have setup Kind
and wish to run the integration tests using Gradle, then execute following command to run all the integration tests.
./gradlew integration_test
-
Setup the deployment namespace.
kubectl create namespace apk-integration-test
-
Go to the
apk/helm-charts
directory and run following commands to install the APK components.helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add jetstack https://charts.jetstack.io helm dependency build helm install apk-test-setup . -n apk-integration-test
-
Port forward router-service to use localhost.
kubectl port-forward svc/apk-test-setup-wso2-apk-gateway-service -n apk-integration-test 9095:9095
-
Add all DNS mappings to
/etc/hosts
file. Refer toscripts/run-tests.sh
file for the domain names.IP=127.0.0.1 sudo echo "$IP <DomainName>" | sudo tee -a /etc/hosts
-
Run or debug integration tests.
Note
If you need to run only one test case, then change
integration_test.go
file with the test name you want to run.- cSuite.Run(t, tests.IntegrationTests) + cSuite.Run(t, []suite.IntegrationTest{tests.<TestName>})
-
Run following command from
apk/test/integration
directory to run the integration tests.go test -v integration_test.go
-
Click on
debug test
option in the IDE to debug the integration tests.
-