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
The test verifies that when both parameters are specified with conflicting values, `crds.enabled` takes precedence over `installCRDs`, which is the documented behavior.
12
+
13
+
## Verification Method
14
+
15
+
The test creates:
16
+
1. A cert-manager deployment with the conflicting configuration
17
+
2. A custom Issuer resource that depends on the cert-manager CRDs
18
+
3. A Certificate resource that further depends on the Issuer
19
+
20
+
If the precedence behavior is correct (crds.enabled takes precedence), then:
21
+
- The CRDs will be installed (following crds.enabled=true, despite installCRDs=false)
22
+
- The Issuer and Certificate resources will be created successfully
23
+
24
+
If the precedence behavior is incorrect, the test will fail as the custom resources cannot be created without the CRDs.
This directory contains tests to verify the CRDs functionality and backward compatibility between the deprecated `installCRDs` field and the new `crds` struct.
4
+
5
+
## Tests Included
6
+
7
+
1.**Legacy Mode Test**: Uses the deprecated `installCRDs: true` parameter to install cert-manager with CRDs.
8
+
2.**New Mode Test**: Uses the new `crds: { enabled: true, keep: true }` structure to install cert-manager with CRDs.
9
+
3.**Conflict Mode Test**: Sets both parameters (`installCRDs: false` and `crds: { enabled: true, keep: true }`),
10
+
verifying that `crds.enabled` takes precedence when both fields are specified.
11
+
12
+
Each test ensures that:
13
+
- The cert-manager deployment succeeds
14
+
- CRDs are properly installed (by creating an Issuer custom resource that depends on them)
15
+
- The custom resources can be created and managed
16
+
17
+
## Running Tests
18
+
19
+
The tests can be run as part of the regular test suite:
20
+
21
+
```bash
22
+
go test ./examples -run=TestCrdsTs
23
+
```
24
+
25
+
Or specifically for the precedence test:
26
+
27
+
```bash
28
+
go test ./examples -run=TestCrdsPrecedenceTs
29
+
```
30
+
31
+
## Expected Outcomes
32
+
33
+
- All three deployment methods should succeed
34
+
- The Custom Resources creation should succeed in all cases
35
+
- For the conflict test with opposing settings (installCRDs=false, crds.enabled=true),
36
+
the test will validate that crds.enabled takes precedence, resulting in CRDs being installed
0 commit comments