◐ Shell
clean mode source ↗

improve: integration test for corner case for activation condition by csviri · Pull Request #3296 · operator-framework/java-operator-sdk

Pull request overview

This PR updates the onedependentactivationcondition integration-test scenario to exercise a corner case where a dependent resource type is “not available” (via a custom resource type) while its activation condition prevents it from being reconciled.

Changes:

  • Switch the workflow dependent in OneDependentActivationConditionReconciler from a ConfigMap-based dependent to NotAvailableDependentResource.
  • Update the dependent resource implementation to target a new NotAvailableCustomResource type.
  • Add NotAvailableCustomResource test CRD type.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/onedependentactivationcondition/OneDependentActivationConditionReconciler.java Switches workflow dependent type to NotAvailableDependentResource to test the “not available dependent” corner case.
operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/onedependentactivationcondition/NotAvailableDependentResource.java Updates dependent to produce NotAvailableCustomResource instead of a ConfigMap.
operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/onedependentactivationcondition/NotAvailableCustomResource.java Introduces a new test CustomResource type used by the dependent.