-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
Quality / Stability / Reliability
-
False
-
-
False
-
None
-
None
-
None
-
None
Add comprehensive unit tests for TLS profile resolution, APIServer watching, ConfigMap generation, and rollout triggering.
Test files to create/modify:
- pkg/tls/config_test.go - TLS profile resolution tests
- pkg/operator/target_config_reconciler_test.go - Integration tests for TLS flow
Test cases for pkg/tls/config_test.go:
- ResolveTLSProfile returns operator profile when set
- ResolveTLSProfile returns cluster profile when operator profile is nil
- ResolveTLSProfile returns Intermediate default when both are nil
- GetTLSConfig correctly converts Old profile
- GetTLSConfig correctly converts Intermediate profile
- GetTLSConfig correctly converts Modern profile
- GetTLSConfig correctly converts Custom profile with user ciphers
- OpenSSL cipher names are converted to IANA names
Test cases for reconciler:
- ConfigMap includes TLS settings from CRD profile
- ConfigMap includes TLS settings from APIServer when CRD is nil
- ConfigMap uses Intermediate default when both are nil
- Deployment annotation changes when TLS profile changes
Acceptance Criteria:
- Unit tests cover all TLS resolution scenarios
- Tests verify ConfigMap generation
- Tests verify rollout triggering logic
- Code coverage meets project requirements
Depends on:
- OCPKUEUE-459 (TLS helper package)
- OCPKUEUE-460 (APIServer watcher)
- OCPKUEUE-461 (ConfigMap generation)