Skip to content

feat(test): add subsystem test for zero-egress no_proxy filtering during Update (PATCH) #1188

@coderabbitai

Description

@coderabbitai

Summary

The PR #1174 (ROSAENG-6793) introduced reviseZeroEgressNoProxy, a helper that strips API-appended zero-egress default domains from proxy.no_proxy in state before persisting. This helper is invoked at the end of Create, Read, and Update.

Subsystem tests were added covering Create and Read/refresh paths, but no test exercises the Update (PATCH) path yet.

Task

Add an It block in subsystem/hcp/cluster_resource_test.go (within the Test Proxy / zero-egress context) that:

  1. Creates a zero-egress cluster (reuse POST/GET handlers similar to the existing create test).
  2. Simulates an update by changing proxy.no_proxy in Terraform.Source and calling Terraform.Apply().
  3. Mocks the PATCH response with aws.zero_egress.no_proxy_default_domains and API-appended default domains in proxy.no_proxy.
  4. Asserts Terraform.Resource("rhcs_cluster_rosa_hcp", "my_cluster").attributes.proxy.no_proxy equals only the user-specified value (e.g., "new.custom.domain").

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions