diff --git a/pumps/graph_mongo_test.go b/pumps/graph_mongo_test.go index e0763d1fa..2b0dbabf3 100644 --- a/pumps/graph_mongo_test.go +++ b/pumps/graph_mongo_test.go @@ -31,16 +31,6 @@ X-Ratelimit-Reset: 0 {"data":{"country":null}}` -const rawGQLResponseWithError = `HTTP/0.0 200 OK -Content-Length: 61 -Connection: close -Content-Type: application/json -X-Ratelimit-Limit: 0 -X-Ratelimit-Remaining: 0 -X-Ratelimit-Reset: 0 - -{"data":{"country":null},"errors":[{"message":"test error"}]}` - const schema = `type Query { countries(filter: CountryFilterInput): [Country!]! country(code: ID!): Country @@ -106,43 +96,6 @@ input LanguageFilterInput { code: StringQueryOperatorInput }` -const rawHTTPReq = `GET /get HTTP/1.1 -Host: localhost:8181 -User-Agent: PostmanRuntime/7.29.2 -Accept: */* -Accept-Encoding: gzip, deflate, br -Postman-Token: a67c3054-aa1a-47f3-9bca-5dbde04c8565 -` - -const rawHTTPResponse = ` -HTTP/1.1 200 OK -Content-Length: 376 -Access-Control-Allow-Credentials: true -Access-Control-Allow-Origin: * -Connection: close -Content-Type: application/json -Date: Tue, 04 Oct 2022 06:33:23 GMT -Server: gunicorn/19.9.0 -X-Ratelimit-Limit: 0 -X-Ratelimit-Remaining: 0 -X-Ratelimit-Reset: 0 - -{ - "args": {}, - "headers": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate, br", - "Host": "httpbin.org", - "Postman-Token": "a67c3054-aa1a-47f3-9bca-5dbde04c8565", - "User-Agent": "PostmanRuntime/7.29.2", - "X-Amzn-Trace-Id": "Root=1-633bd3b3-6345504724f3295b68d7dcd3" - }, - "origin": "::1, 102.89.45.253", - "url": "http://httpbin.org/get" -} - -` - func TestGraphMongoPump_WriteData(t *testing.T) { conf := defaultConf() pump := GraphMongoPump{ diff --git a/pumps/graph_sql_test.go b/pumps/graph_sql_test.go index 02ac44836..8182e78c1 100644 --- a/pumps/graph_sql_test.go +++ b/pumps/graph_sql_test.go @@ -330,13 +330,18 @@ func TestGraphSQLPump_Sharded(t *testing.T) { baseRecord := analytics.AnalyticsRecord{ APIID: "test-api", Path: "/test-api", - RawRequest: convToBase64(rawGQLRequest), - RawResponse: convToBase64(rawGQLResponse), - ApiSchema: convToBase64(schema), - Tags: []string{analytics.PredefinedTagGraphAnalytics}, APIName: "test-api", ResponseCode: 200, Method: "POST", + GraphQLStats: analytics.GraphQLStats{ + IsGraphQL: true, + Types: map[string][]string{ + "Country": {"code"}, + }, + RootFields: []string{"country"}, + OperationType: analytics.OperationQuery, + HasErrors: false, + }, } expectedTables := make([]string, 0)