MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / commitWithTsKeysOnly

Function commitWithTsKeysOnly

dgraph/cmd/alpha/http_test.go:367–384  ·  view source on GitHub ↗
(keys []string, ts uint64, hash string)

Source from the content-addressed store, hash-verified

365}
366
367func commitWithTsKeysOnly(keys []string, ts uint64, hash string) error {
368 url := addr + "/commit"
369 if ts != 0 {
370 url += "?startTs=" + strconv.FormatUint(ts, 10)
371 url += "&hash=" + hash
372 }
373
374 b, err := json.Marshal(keys)
375 if err != nil {
376 return err
377 }
378 req, err := http.NewRequest("POST", url, bytes.NewReader(b))
379 if err != nil {
380 return err
381 }
382 _, _, _, err = runRequest(req)
383 return err
384}
385
386func TestTransactionBasic(t *testing.T) {
387 require.NoError(t, dropAll())

Callers 1

Calls 1

runRequestFunction · 0.85

Tested by

no test coverage detected