MCPcopy
hub / github.com/dgraph-io/dgraph / testFileHandlerForDir

Function testFileHandlerForDir

worker/backup_manifest_test.go:235–240  ·  view source on GitHub ↗

testFileHandlerForDir returns a fileHandler and parsed URL for a temp directory.

(t *testing.T, dir string)

Source from the content-addressed store, hash-verified

233
234// testFileHandlerForDir returns a fileHandler and parsed URL for a temp directory.
235func testFileHandlerForDir(t *testing.T, dir string) (*fileHandler, *url.URL) {
236 t.Helper()
237 uri, err := url.Parse(dir)
238 require.NoError(t, err)
239 return NewFileHandler(uri), uri
240}
241
242// writeMasterManifestToDir writes a MasterManifest to dir/manifest.json.
243func writeMasterManifestToDir(t *testing.T, dir string, manifests []*Manifest) {

Calls 2

NewFileHandlerFunction · 0.85
ParseMethod · 0.65

Tested by

no test coverage detected