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

Function TestQueryVarEmptyRootOrderChildQueryError

query/query0_test.go:1483–1502  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1481}
1482
1483func TestQueryVarEmptyRootOrderChildQueryError(t *testing.T) {
1484 // This bug was fixed in commit b256f9c6e6c68ae163eee3242518f77a6ab35fa0
1485 dgraphtest.ShouldSkipTest(t, "b256f9c6e6c68ae163eee3242518f77a6ab35fa0", dc.GetVersion())
1486
1487 query := `
1488 {
1489 var(func: eq(name, "DNEinDB")) {
1490 friend(orderdesc: id) {
1491 f as count(uid)
1492 }
1493 }
1494 q(func: uid(f)){
1495 name
1496 }
1497 }
1498 `
1499 _, err := processQuery(context.Background(), t, query)
1500 require.Error(t, err)
1501 require.Contains(t, err.Error(), "Cannot sort by unknown attribute id")
1502}
1503
1504func TestQueryVarValOrderDesc(t *testing.T) {
1505 query := `

Callers

nothing calls this directly

Calls 4

ShouldSkipTestFunction · 0.92
processQueryFunction · 0.70
GetVersionMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected