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
test(all): remove all references to CleanBucket #4000
Conversation
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
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.
One comment regarding prefixes; otherwise seems good.
internal/testutil/storage_cleaner.go
Outdated
|
||
// UniqueBucketName returns a unique name with the test prefix. | ||
// UniqueBucketName returns a unique name with the test prefix | ||
// Any bucket created with this prefix may be deleted by DeleteExpiredBuckets. |
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.
Is this actually true?
If so we should be sure to leave bucket prefixes alone for existing tests so we don't accidentally try to delete any buckets that people want to save.
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.
Hmm, so it's true in that it "may" be lol. That is, if you call DeleteExpiredBuckets
with the same prefix, which we do in storage tests I believe, those buckets will be deleted. But it's confusing, so I'll delete this comment. We definitely aren't storing prefixes and then deleting buckets based on that.
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.
Could you double check that you haven't changed prefixes for anything that does use DeleteExpiredBuckets? Otherwise we are good I'd say.
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.
Check done - nothing to note.
Description
Fixes #3565
Bumps the version of golang-samples to pick up changes to testutil. Replaces references to
CleanBucket
with methods that include bucket cleanup and error checking.Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
go test -v ./..
(see Testing)gofmt
(see Formatting)go vet
(see Formatting)