sync_gateway icon indicating copy to clipboard operation
sync_gateway copied to clipboard

Consistently clean up test scopes/collections

Open markspolakovs opened this issue 2 years ago • 1 comments

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/

markspolakovs avatar Aug 11 '22 12:08 markspolakovs

Rebased to pick up #5695 unit test fix.

markspolakovs avatar Aug 12 '22 08:08 markspolakovs