|
| 1 | +# End-to-End (E2E) Test Suite |
| 2 | + |
| 3 | +This repository segment encapsulates the comprehensive E2E testing procedures for this project module. It harnesses the `fixture.RunConformance` method to execute conformity verification sequences, ensuring adherence to `cert-manager` established protocols. |
| 4 | + |
| 5 | +## Test Execution Workflow |
| 6 | + |
| 7 | +### Environmental Prerequisite Configuration: |
| 8 | +For appropriate test initialization within the STACKIT ecosystem, it is imperative to align the environment with |
| 9 | +the predetermined specifications. STACKIT dictates a structural model where a parent project umbrellas various |
| 10 | +resource entities, inclusive of DNS zones. |
| 11 | + |
| 12 | +1. **Project Identification Parameterization**: |
| 13 | +Configure the unique `project_id` in the [configuration manifest](../testdata/stackit/config.json). Typical configuration appears as: |
| 14 | + ```json |
| 15 | + { |
| 16 | + "projectId": "c242332a-ae82-42e2-80e8-eed338fd2b2f", |
| 17 | + "authTokenSecretNamespace": "default" |
| 18 | + } |
| 19 | + ``` |
| 20 | + |
| 21 | + This instantiation assumes the existence of the specified project, and the associated authentication |
| 22 | + token possesses requisite privileges for project and zone access. |
| 23 | +2. **Authentication Token Configuration**: |
| 24 | +Establish an environment variable for the authentication token, duly vested with CRUD permissions for DNS zones: |
| 25 | + ```bash |
| 26 | + export STACKIT_TOKEN="<your-token>" |
| 27 | + ``` |
| 28 | +3. **Zone Initialization**: |
| 29 | +Declare the testing DNS zone. Ensure project_id consistency: |
| 30 | + ```bash |
| 31 | + export TEST_ZONE_NAME="test-zone.runs.onstackit.cloud" |
| 32 | + ``` |
| 33 | + Invoke the following HTTP request to either instantiate a fresh zone or validate the existing one: |
| 34 | + ```bash |
| 35 | + curl --location "https://dns.api.stackit.cloud/v1/projects/c242332a-ae82-42e2-80e8-eed338fd2b2f/zones" \ |
| 36 | + --header 'Content-Type: application/json' \ |
| 37 | + --header "Authorization: Bearer $AUTHENTICATION_TOKEN" \ |
| 38 | + --data '{ |
| 39 | + "name": "cert manager e2e test", |
| 40 | + "dnsName": "$TEST_ZONE_NAME" |
| 41 | + }' |
| 42 | + ``` |
| 43 | + Post successful invocation, validate zone ownership. For pre-existing zones, consider a unique zone parameter. |
| 44 | + |
| 45 | +### Environmental Prerequisite Configuration: |
| 46 | +With prerequisites addressed, proceed to run the entire E2E test suite: |
| 47 | +```bash |
| 48 | +make test-e2e |
| 49 | +``` |
0 commit comments