(t *testing.T, query string, vars map[string]string)
| 96 | } |
| 97 | |
| 98 | func processQueryWithVars(t *testing.T, query string, |
| 99 | vars map[string]string) (string, error) { |
| 100 | txn := client.NewTxn() |
| 101 | defer func() { _ = txn.Discard(context.Background()) }() |
| 102 | |
| 103 | res, err := txn.QueryWithVars(context.Background(), query, vars) |
| 104 | if err != nil { |
| 105 | return "", err |
| 106 | } |
| 107 | |
| 108 | response := map[string]interface{}{} |
| 109 | response["data"] = json.RawMessage(string(res.Json)) |
| 110 | |
| 111 | jsonResponse, err := json.Marshal(response) |
| 112 | require.NoError(t, err) |
| 113 | return string(jsonResponse), err |
| 114 | } |
| 115 | |
| 116 | func addTriplesToCluster(triples string) error { |
| 117 | txn := client.NewTxn() |
no outgoing calls
no test coverage detected