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

Function RequireXattrNotFound

base/util_testing.go:1011–1015  ·  view source on GitHub ↗

RequireXattrNotFound asserts that the given xattr is not found on the document.

(t testing.TB, dataStore sgbucket.DataStore, docID string, xattrName string)

Source from the content-addressed store, hash-verified

1009
1010// RequireXattrNotFound asserts that the given xattr is not found on the document.
1011func RequireXattrNotFound(t testing.TB, dataStore sgbucket.DataStore, docID string, xattrName string) {
1012 xattrs, _, err := dataStore.GetXattrs(TestCtx(t), docID, []string{xattrName})
1013 require.Error(t, err, fmt.Sprintf("Expected xattr %q to not be found on document %q but has contents %s", xattrName, docID, xattrs[xattrName]))
1014 RequireXattrNotFoundError(t, err)
1015}
1016
1017// underGoTest returns true if the tests are being run via 'go test'
1018func underGoTest() bool {

Callers 2

Calls 4

TestCtxFunction · 0.85
GetXattrsMethod · 0.45
ErrorMethod · 0.45

Tested by 2