The end-to-end (E2E) tests check if you can install, upgrade and uninstall BTP Manager. There are two tests:
e2e-tests
for checking installation and uninstallation of a given BTP Manager versione2e-upgrade-tests
for checking BTP Manager upgradability from one version to another
The flows of the tests are similar. The upgrade tests contain extra steps for checking whether BTP Manager works as expected after upgrading to a new version. You can see the differences between the tests in the descriptions of the tests' flows below.
- Create a Kubernetes cluster.
- Wait for the BTP Manager image to be available in the registry.
- Install the BTP Manager using
make deploy
. - Verify if deployment is in the
Available
state. - Install BtpOperator.
- Verify if BtpOperator has the
Ready
status equal toTrue
. - Create a ServiceInstance and ServiceBinding with either real or dummy credentials.
- Verify if the ServiceInstance and ServiceBinding have the
Ready
status set to:True
if you use real credentials.NotProvisioned
if you use dummy credentials.
- Try to uninstall BtpOperator without the
force delete
label. - Verify if the deprovisioning safety measures work.
- Add the
force delete
label to BtpOperator custom resource (CR). - Verify if BtpOperator, ServiceInstance CustomResourceDefinition (CRD) and ServiceBinding CRD were deleted.
- Uninstall BTP Manager.
- Create a Kubernetes cluster.
- Wait for the new BTP Manager image to be available in the registry.
- Download the manifest for the latest release.
- Install the latest release of BTP Manager using
kubectl apply
. - Verify if deployment is in the
Available
state. - Install BtpOperator.
- Verify if BtpOperator has the
Ready
status equal toTrue
. - Create a ServiceInstance and ServiceBinding with real credentials.
- Verify if the ServiceInstance and ServiceBinding have the
Ready
status set toTrue
. - Upgrade BTP Manager to the new version using
make deploy
. - Verify if deployment is in the
Available
state. - Verify if the existing ServiceInstance and ServiceBinding have the
Ready
status set toTrue
. - Create a new ServiceBinding with real credentials.
- Verify if the new ServiceBinding has the
Ready
status set toTrue
. - Try to uninstall BtpOperator without the
force delete
label. - Verify if the deprovisioning safety measures work.
- Add the
force delete
label to BtpOperator CR. - Verify if BtpOperator, ServiceInstance CRD and ServiceBinding CRD were deleted.
- Uninstall BTP Manager.
The GitHub Actions workflows execute the two tests:
The Kubernetes cluster is created, and the sources are checked out. The workflows wait till the binary image is available for fetching. The scripts create the required prerequisites, get the BTP Manager and BtpOperator installed or upgraded, validate expected statuses, and get BtpOperator and BTP Manager uninstalled.
Real credentials used in the test are configured as repository secrets.
The following secrets are used and substituted in the sap-btp-manager
Kyma Secret resource:
- SM_CLIENT_ID - Service Manager client ID,
data.clientid
- SM_CLIENT_SECRET - Service Manager client secret,
data.clientsecret
- SM_URL - Service Manager URL,
data.sm_url
- SM_TOKEN_URL - Service Manager token URL,
data.tokenurl
All secrets should be base64 encoded. Caveat of the new line character at the end of the secret value.
The following bash command could be used to encode the secret:
echo -n "secret" | base64
Currently used values are taken from Service Binding e2e-test-sm
created for the e2e-test-sm
Service Manager instance in the e2e-test-btp-manager
subaccount of the kyma-gopher
global account on the Canary environment.
In case of credentials rotation, the secrets should be updated in the repository secrets, regardless of the location and naming of the Service Manager instance and Secret Binding used.