You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor: Merge ChangeSetManager into CloudFormationOperations
This commit consolidates changeset functionality into the main CloudFormation
interface for better architectural cohesion and cleaner abstractions.
Major Changes:
* Merge ChangeSetManager interface into CloudFormationOperations
* Add high-level changeset methods: CreateChangeSetPreview() and CreateChangeSetForDeployment()
* Remove AWS SDK-exposing methods from public interface (CreateChangeSet, ExecuteChangeSet, DescribeChangeSet)
* Simplify DeleteChangeSet to accept string instead of AWS SDK types
* Rename ExecuteChangeSetByID to ExecuteChangeSet for cleaner API
File Changes:
* Delete internal/aws/changeset.go - functionality moved to cloudformation.go
* Merge changeset_test.go into cloudformation_test.go
* Consolidate mocks into single MockCloudFormationClient
* Remove awsinternal import alias - no longer needed
* Update all callers (deploy, diff modules) to use new interface
* Update documentation to reflect new architecture
Benefits:
* Cleaner architecture - one less interface to maintain
* Better encapsulation - no AWS SDK types exposed in public interface
* Improved cohesion - changeset operations naturally belong with CloudFormation
* Simpler testing - unified mock eliminates duplication
* Enhanced usability - high-level methods provide complete workflows
All tests pass, linting clean, full backward compatibility maintained.
The AWS client architecture is designed for comprehensive testing using interface-based mocking:
404
466
405
467
#### Primary Testing Pattern
468
+
469
+
The AWS package provides a comprehensive `MockCloudFormationClient` that implements the `CloudFormationClient` interface for testing all CloudFormation operations, including changeset functionality:
0 commit comments