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

Function rosmarUriFromPath

base/util_testing.go:175–184  ·  view source on GitHub ↗

GetDefaultDataStore returns the default DataStore. This is likely never actually wanted over GetSingleDataStore, so is left commented until absolutely required. func (b *TestBucket) GetDefaultDataStore() sgbucket.DataStore { b.t.Logf("Using default collection - Are you sure you want this instead of

(path string)

Source from the content-addressed store, hash-verified

173
174// rosmarUriFromPath works to convert a path to a rosmar uri.
175func rosmarUriFromPath(path string) string {
176 // convert windows paths to unix style paths for rosmar, plus leading /
177 uri := rosmar.URLScheme + "://"
178 if runtime.GOOS == "windows" {
179 if filepath.IsAbs(path) {
180 uri += "/"
181 }
182 }
183 return uri + strings.ReplaceAll(path, `\`, `/`)
184}
185
186// Should Sync Gateway use XATTRS functionality when running unit tests?
187func TestUseXattrs() bool {

Callers 1

getTestBucketAndSpecMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected