Skip to content

Latest commit

 

History

History

End-to-End tests

This directory contains end-to-end tests for the provider. The tests are adapted from the Cluster API end-to-end tests.

Running the tests

To run the tests, you need to have the following tools installed:

Besides the tools, the following environment variables need to be set:

  • IONOS_TOKEN: The IONOS API token
  • CONTROL_PLANE_ENDPOINT_LOCATION: The location for the control plane endpoint and machine image.
  • IONOSCLOUD_MACHINE_IMAGE_ID: The ID of the machine image to be used for the nodes. MUST be in the location specified by CONTROL_PLANE_ENDPOINT_LOCATION.

Before running the tests, you need to build the provider image.

make docker-build

To run the tests, execute the following command:

make test-e2e

To skip the conformance tests, set GINKGO_LABEL to !Conformance.

make test-e2e GINKGO_LABEL='!Conformance'

If you want to skip the cleanup of the resources after the tests, you can set the make ``SKIP_CLEANUP variable to true.

make test-e2e SKIP_CLEANUP=true

Developing tests

Besides the guidelines in the Developing E2E tests, it is recommended to check the Cluster API end-to-end tests as what you might want to write might be already available there. If so, feel free to copy the test and adapt it to the provider.