sync_gateway
sync_gateway copied to clipboard
Consistently clean up test scopes/collections
Tests that use FlushBucketEmptierFunc
(auth
and base
packages) would run dropAllScopesAndCollections
when cleaning up a test bucket, but tests that use ViewsAndGSIBucketReadier
would not, leading to test failures because of dangling scopes/collections. This PR makes the latter also use the (newly exported) DropAllScopesAndCollections
.
Pre-review checklist
- [x] Removed debug logging (
fmt.Print
,log.Print
, ...) - [x] Logging sensitive data? Make sure it's tagged (e.g.
base.UD(docID)
,base.MD(dbName)
) - [x] Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in
docs/api
Integration Tests
- [ ]
xattrs=true,gsi=true
https://jenkins.sgwdev.com/job/SyncGateway-Integration/606/
Rebased to pick up #5695 unit test fix.