-
Notifications
You must be signed in to change notification settings - Fork 29
Add janitor to clean up Cloud Map integration test resources #57
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #57 +/- ##
==========================================
+ Coverage 47.70% 50.36% +2.66%
==========================================
Files 9 11 +2
Lines 1000 1082 +82
==========================================
+ Hits 477 545 +68
- Misses 502 512 +10
- Partials 21 25 +4
Continue to review full report at Codecov.
|
integration/janitor/janitor.go
Outdated
| return "", nil | ||
| } | ||
|
|
||
| func (j *janitor) deregInsts(ctx context.Context, svcId string) { |
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.
Let's just avoid too much of shortening of the function names.
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.
Unreadable clunky abbreviations are idiomatic in go/Unix culture (kubectl? gobcon?), especially for anything we’re not exporting but we can be more verbose like Java.
7a85132 to
6af6269
Compare
Make ListInstances return instance summaries for reusability
6af6269 to
edf96d8
Compare
|
Refactored ListInstances in API class to return list of instance summaries, in favour of deferring endpoint conversion in the client. This allows us to re-use the call for janitor. |
runakash
left a comment
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.

Issue #, if available: 45
Description of changes:
Create janitor script to clean up all resources under a namespace in Cloud Map, to reset test account in between integration test executions.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.