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

Function assertDesignDocNotExists

db/design_doc_util_test.go:34–38  ·  view source on GitHub ↗

assertDesignDocDoesNotExist ensures that the design doc does not exist in the dataStore.

(t testing.TB, viewStore sgbucket.ViewStore, ddocName string)

Source from the content-addressed store, hash-verified

32
33// assertDesignDocDoesNotExist ensures that the design doc does not exist in the dataStore.
34func assertDesignDocNotExists(t testing.TB, viewStore sgbucket.ViewStore, ddocName string) bool {
35 ddoc, err := viewStore.GetDDoc(ddocName)
36 assert.Error(t, err, "Design doc %s should not exist but but it did: %v", ddocName, ddoc)
37 return assert.Truef(t, IsMissingDDocError(err), "Design doc %s should not exist but got a different error fetching it: %v", ddocName, err)
38}

Callers 1

Calls 3

IsMissingDDocErrorFunction · 0.85
GetDDocMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected