MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / TestLiveLoadFileName

Function TestLiveLoadFileName

dgraph/cmd/live/load-uids/load_test.go:304–318  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

302}
303
304func TestLiveLoadFileName(t *testing.T) {
305 testutil.DropAll(t, dg)
306
307 pipeline := [][]string{
308 {testutil.DgraphBinaryPath(), "live",
309 "--files", testDataDir + "/correct1.rdf," + testDataDir + "/errored1.rdf",
310 "--alpha", alphaService, "--creds", "user=groot;password=password;"},
311 }
312
313 out, err := testutil.Pipeline(pipeline)
314 require.Error(t, err, "error expected: live loader exited with no error")
315 errLine := extractErrLine(out)
316 errLineExp := fmt.Sprintf(`Error while processing data file %s/errored1.rdf:`, testDataDir)
317 require.Equal(t, errLineExp, errLine, "incorrect name for errored file")
318}
319
320func TestLiveLoadFileNameMultipleErrored(t *testing.T) {
321 testutil.DropAll(t, dg)

Callers

nothing calls this directly

Calls 5

DropAllFunction · 0.92
DgraphBinaryPathFunction · 0.92
PipelineFunction · 0.92
extractErrLineFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…