Skip to content

Compare the unit test fixes for control-plane/subcommand/sync-catalog only #5271

Draft
Manishakumari-hc wants to merge 32 commits into
manisha/all_ocp_testsfrom
manisha/UT_ocp
Draft

Compare the unit test fixes for control-plane/subcommand/sync-catalog only #5271
Manishakumari-hc wants to merge 32 commits into
manisha/all_ocp_testsfrom
manisha/UT_ocp

Conversation

@Manishakumari-hc
Copy link
Copy Markdown
Collaborator

@Manishakumari-hc Manishakumari-hc commented Apr 28, 2026

  • This PRs base branch will be changed to dinesh/ocp one the dedicated changes are analysed .It will be easier to compare the changes,hence base branch is different.
  • Commits for subcommand/sync-catalog to pass the unit tests are in consul-k8s/control-plane/subcommand/sync-catalog/command_test.go.
  • Test "PASS" result is attached below :
    sync_Catalog_testResult.log

vdinesh4738 and others added 29 commits April 6, 2026 09:38
* Add secret watch to terminating gateway controller logic

* add tests

* update test acceptance tests

* update test acceptance tests

* removing acceptance tests
…policy

added "component: api-gateway" for stable controller and "component: api-gateway-consul" for custom controller.

Added kind check in the gatewaypolicies. Webhook denies the policy if targetRef.kind is not Gateway.
* temp commit

* feat: add HPA support for API gateway scaling with annotations

* feat: gate API Gateway scaling behind enterprise flag

* feat: add default value for apiGateway openshiftSCCName and improve tests

* feat: verify HPA ownership before deletion in api gateway scaling

* style(api-gateway): add periods to comment sentences in scaling code for lint issues

* add changelog

* feat: gate API gateway scaling behind enterprise license validation

* test(connect-inject): improve openshift SCC test selector reliability

* fix(consul): prevent config mutation by cloning in IsEnterpriseDistribution

* api gateway scaling integration tests (#5201)

* temp commit

* feat: add HPA support for API gateway scaling with annotations

* feat: gate API Gateway scaling behind enterprise flag

* test(api-gateway): add scaling integration tests for HPA and replica management

* fix removed license and test for enterprise license check

* test(api-gateway): add controller restart for enterprise license detection

* add restart controller to all enterprise gate enabled

---------

Co-authored-by: P Ajay Rao <pajay.rao@hashicorp.com>
* kind test check

* Update kind_acceptance_test_packages.yaml

* Update api_gateway_lifecycle_test.go

* final reconcile for previously controlled gateway

* Update api_gateway_lifecycle_test.go

* log check

* Update api_gateway_lifecycle_test.go

* Update api_gateway_lifecycle_test.go

* Update gateway_controller.go

* Update api_gateway_lifecycle_test.go

* Update gateway_controller.go

* fixed api-gateway lifecycle testcase

* enable all tcs

* verify the cross partiton case

* use last version image for consul

* Update partitions_gateway_test.go

* new image

* Update partitions_gateway_test.go

* Update values.yaml

* revert to what is needed

* lint

* enable gatewayclass; add labels introduced in new manifests

* Update command.go
* Update submodules

* Update changelogs
* kind test check

* Update kind_acceptance_test_packages.yaml

* Update api_gateway_lifecycle_test.go

* final reconcile for previously controlled gateway

* Update api_gateway_lifecycle_test.go

* log check

* Update api_gateway_lifecycle_test.go

* Update api_gateway_lifecycle_test.go

* Update gateway_controller.go

* Update api_gateway_lifecycle_test.go

* Update gateway_controller.go

* fixed api-gateway lifecycle testcase

* enable all tcs

* verify the cross partiton case

* use last version image for consul

* Update partitions_gateway_test.go

* new image

* Update partitions_gateway_test.go

* Update values.yaml

* revert to what is needed

* lint

* enable gatewayclass; add labels introduced in new manifests

* Update command.go

* fixed UT with fake client

* fix UTs

* fix: added test in custom api gateway (#5242)

* fix: added test in custom api gateway

* docs: added note explaining why we are not going with event based waiting

* removed for rc1, should be fixed later

* remove unused func

* Update command.go

* comment functions required only for test till UT is fixed

---------

Co-authored-by: Kruti Baraiya <baraiyakruti@gmail.com>
Signed-off-by: Manisha Kumari <manisha.kumari@hashicorp.com>
@Manishakumari-hc Manishakumari-hc self-assigned this Apr 28, 2026
@Manishakumari-hc Manishakumari-hc changed the base branch from dinesh/ocp to manisha/all_ocp_tests April 28, 2026 05:09
Signed-off-by: Manisha Kumari <manisha.kumari@hashicorp.com>
@Manishakumari-hc Manishakumari-hc changed the title unit test fixes unit test fixes for control-plane/subcommand/sync-catalog Apr 28, 2026
Comment on lines +50 to +52
type settableGates interface {
Set(feature clientfeatures.Feature, value bool) error
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this interface definition at package level instead of defining inline - for better code organisation and reusability?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this function TestMain is handling two unrelated concerns so it makes more sense to move the gate setting interface out of it

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed by moving the interface out of the function at package level.

Signed-off-by: Manisha Kumari <manisha.kumari@hashicorp.com>
@Manishakumari-hc Manishakumari-hc changed the title unit test fixes for control-plane/subcommand/sync-catalog Compare the unit test fixes for control-plane/subcommand/sync-catalog only May 6, 2026
Signed-off-by: Manisha Kumari <manisha.kumari@hashicorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants