Uploaded image for project: 'OpenShift Kueue'
  1. OpenShift Kueue
  2. OCPKUEUE-464

Unit tests for operator TLS functionality

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 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:

              harpatil@redhat.com Harshal Patil
              harpatil@redhat.com Harshal Patil
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: