(t *testing.T, query string, vars map[string]string)
| 107 | } |
| 108 | |
| 109 | func processQueryWithVars(t *testing.T, query string, |
| 110 | vars map[string]string) (string, error) { |
| 111 | txn := client.NewTxn() |
| 112 | defer func() { _ = txn.Discard(context.Background()) }() |
| 113 | |
| 114 | res, err := txn.QueryWithVars(context.Background(), query, vars) |
| 115 | if err != nil { |
| 116 | return "", err |
| 117 | } |
| 118 | |
| 119 | response := map[string]interface{}{} |
| 120 | response["data"] = json.RawMessage(string(res.Json)) |
| 121 | |
| 122 | jsonResponse, err := json.Marshal(response) |
| 123 | require.NoError(t, err) |
| 124 | return string(jsonResponse), err |
| 125 | } |
| 126 | |
| 127 | func addTriplesToCluster(triples string) error { |
| 128 | txn := client.NewTxn() |
no outgoing calls
no test coverage detected