MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / setDesignDocPreviousVersionsForTest

Function setDesignDocPreviousVersionsForTest

db/design_doc_util_test.go:19–25  ·  view source on GitHub ↗

setDesignDocPreviousVersionsForTest sets the previous versions of the design docs for testing purposes and reverts to the original set once the test is done.

(t testing.TB, versions ...string)

Source from the content-addressed store, hash-verified

17
18// setDesignDocPreviousVersionsForTest sets the previous versions of the design docs for testing purposes and reverts to the original set once the test is done.
19func setDesignDocPreviousVersionsForTest(t testing.TB, versions ...string) {
20 original := DesignDocPreviousVersions
21 t.Cleanup(func() {
22 DesignDocPreviousVersions = original
23 })
24 DesignDocPreviousVersions = versions
25}
26
27// assertDesignDocExists ensures that the design doc exists in the dataStore.
28func assertDesignDocExists(t testing.TB, viewStore sgbucket.ViewStore, ddocName string) bool {

Calls

no outgoing calls

Tested by

no test coverage detected