You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -9,23 +9,49 @@ Platform-service-test-runner allows to define and run in-cluster tests on the op
9
9
## Architecture
10
10
11
11
### E2ETestSpecification
12
-
The `E2ETestSpecification` custom resource defines a set of test cases and its configuration. It creates an `E2ETestRun` resource to execute the tests defined in the specification.
12
+
The `E2ETestSpecification` custom resource defines a set of test cases and its configuration. It creates an `E2ETestRun` resource to execute the tests defined in the specification.
13
13
```yaml
14
14
apiVersion: test-runner.openmcp.cloud/v1alpha1
15
15
kind: E2ETestSpecification
16
16
metadata:
17
-
name: test-spec
17
+
name: test-full-suite
18
18
spec:
19
-
# optional cron schedule for periodic test execution.
19
+
# optional cron schedule for periodic test execution.
@@ -37,87 +63,143 @@ Currently, the following configuration keys exist:
37
63
| --- | --- | --- |
38
64
| `chargingTarget` | `createProject` | Specifies the charging target for the project. Value should be a UUID. |
39
65
| `chargingTargetType` | `createProject` | Specifies the type of the charging target for the project. |
66
+
| `manifest` | `createService` | Required. Inline YAML manifest for the ServiceProvider API resource to apply (e.g. a `Flux` or `Crossplane` resource). The `name` and `namespace` are set automatically from the `createControlPlane` exports. |
67
+
| `assertions` | `createService` | Optional list of JSONPath assertions to wait for on the created resource. Each entry has a `path` (JSONPath expression, e.g. `.status.phase`) and an expected `value`. The test case polls until all assertions pass. |
40
68
| `identity` | All test cases | Automatically added by the controller, contains the username retrieved via `authenticationv1.SelfSubjectReview{}`. |
41
69
| `pollInterval` | All test cases | Polling interval for waiting for conditions. Duration string (e.g., "30s"). Defaults to 10 seconds if not specified. |
42
70
| `pollTimeout` | All test cases | Polling timeout for waiting for conditions. Duration string (e.g., "5m"). Defaults to 5 minutes if not specified. |
43
71
44
72
45
73
46
74
### E2ETestRun
47
-
The `E2ETestRun` custom resource represents a test execution.
75
+
The `E2ETestRun` custom resource represents a test execution.
48
76
It is created by the `e2etestspecification_controller.go` controller when an `E2ETestSpecification` is created and a new test run needs to be started (based on the schedule).
49
77
It contains the status of the test execution, including which test cases have been executed, their results, and any exports they produced for subsequent test cases.
50
-
This resource is not deleted after the test execution, but remains in the cluster for inspection and debugging purposes.
78
+
This resource is not deleted after the test execution, but remains in the cluster for inspection and debugging purposes.
- **Run**: Executes the test case. Returns exports (key-value pairs for subsequent tests), error details, and error.
219
+
- **StatusName**: Returns the name used to identify this test case's status entry. For test cases that can appear multiple times (e.g. `createService`), incorporate a discriminator from config (e.g. the manifest kind) to produce a unique name like `createService/Flux`.
220
+
- **Run**: Executes the test case. Returns exports (key-value pairs for subsequent tests), debug info, and error.
137
221
- **Cleanup**: Performs cleanup after the test (e.g., delete created resources).
0 commit comments