(t *testing.T)
| 19 | ) |
| 20 | |
| 21 | func TestPopulateMutationMap(t *testing.T) { |
| 22 | edges := []*pb.DirectedEdge{{ |
| 23 | Value: []byte("set edge"), |
| 24 | Attr: x.AttrInRootNamespace(""), |
| 25 | }} |
| 26 | schema := []*pb.SchemaUpdate{{ |
| 27 | Predicate: x.AttrInRootNamespace("name"), |
| 28 | }} |
| 29 | m := &pb.Mutations{Edges: edges, Schema: schema} |
| 30 | |
| 31 | mutationsMap, err := populateMutationMap(m) |
| 32 | require.NoError(t, err) |
| 33 | mu := mutationsMap[1] |
| 34 | require.NotNil(t, mu) |
| 35 | require.NotNil(t, mu.Edges) |
| 36 | require.NotNil(t, mu.Schema) |
| 37 | } |
| 38 | |
| 39 | func TestCheckSchema(t *testing.T) { |
| 40 | require.NoError(t, posting.DeleteAll()) |
nothing calls this directly
no test coverage detected