-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP]Elasticache Teardown #1
[WIP]Elasticache Teardown #1
Conversation
6231afd
to
0032c46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few small comments.
We should also remove ./a.out
, looks like it was added by accident. A git status
and git add
'ing files or directories to the staging area/index in git individually may have helped avoid this. See [1] for more details.
Let's also ensure we have tests for the elasticache#DeleteResourcesForCluster
function before merging. [2] can be used as a template here.
[1] https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
[2] https://github.com/integr8ly/cluster-service/blob/95cd3421a83db0e95dfdfd00db9afe5c2d42fbb3/pkg/aws/rds_test.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, will try it out on a cluster
}, | ||
taggingClient: func() *resourcetaggingClientMock { | ||
fakeTaggingClient, err := fakeResourcetaggingClient(func(c *resourcetaggingClientMock) error { | ||
c.GetResourcesFunc = func(in1 *resourcegroupstaggingapi.GetResourcesInput) (output *resourcegroupstaggingapi.GetResourcesOutput, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we returning an error when mocking this function if we're expecting the entire function run to pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My Approach to this was that we want to block the input for the delete function by returning a nil as an output of getResources
so that it doesn't have anything to delete, and then since it doesn't delete anything it won't return the reportItem
, then just checking that the report item isn't in fact created when no resources are deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested locally against aws. looks good
refactor snapshot deletion to not require replicationgroup
Adding new classes to the AWS teardown CLI for elasticache and postgres