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)
| 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. |
| 19 | func 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. |
| 28 | func assertDesignDocExists(t testing.TB, viewStore sgbucket.ViewStore, ddocName string) bool { |
no outgoing calls
no test coverage detected