diff --git a/go/webhook/testcases/testdata/testcases/adjust/simple_track_call_with_no_query_parameters_v2_version.json b/go/webhook/testcases/testdata/testcases/adjust/simple_track_call_with_no_query_parameters_v2_version.json new file mode 100644 index 00000000000..f9a999925fe --- /dev/null +++ b/go/webhook/testcases/testdata/testcases/adjust/simple_track_call_with_no_query_parameters_v2_version.json @@ -0,0 +1,31 @@ +{ + "name": "adjust", + "description": "Simple track call with no query parameters v2 version", + "input": { + "request": { + "body": { + "id": "adjust", + "updated_at": "2023-02-10T12:16:07.251Z", + "created_at": "2023-02-10T12:05:04.402Z" + }, + "headers": { + "Content-Type": "application/json" + } + } + }, + "output": { + "response": { + "status": 400, + "body": "Query_parameters is missing\n" + }, + "queue": [], + "errQueue": [ + { + "id": "adjust", + "updated_at": "2023-02-10T12:16:07.251Z", + "created_at": "2023-02-10T12:05:04.402Z" + } + ] + }, + "skip": "FIXME" +} diff --git a/go/webhook/testcases/testdata/testcases/adjust/simple_track_call_with_wrong_created_at_v2_version.json b/go/webhook/testcases/testdata/testcases/adjust/simple_track_call_with_wrong_created_at_v2_version.json new file mode 100644 index 00000000000..6409abcede3 --- /dev/null +++ b/go/webhook/testcases/testdata/testcases/adjust/simple_track_call_with_wrong_created_at_v2_version.json @@ -0,0 +1,40 @@ +{ + "name": "adjust", + "description": "Simple track call with wrong created at v2 version", + "input": { + "request": { + "query": { + "gps_adid": ["38400000-8cf0-11bd-b23e-10b96e40000d"], + "adid": ["18546f6171f67e29d1cb983322ad1329"], + "tracker_token": ["abc"], + "custom": ["custom"], + "tracker_name": ["dummy"], + "created_at": ["test"], + "event_name": ["Click"] + }, + "body": { + "id": "adjust", + "updated_at": "2023-02-10T12:16:07.251Z", + "created_at": "test" + }, + "headers": { + "Content-Type": "application/json" + } + } + }, + "output": { + "response": { + "status": 400, + "body": "Failed to parse timestamp: \"test\"\n" + }, + "queue": [], + "errQueue": [ + { + "id": "adjust", + "updated_at": "2023-02-10T12:16:07.251Z", + "created_at": "test" + } + ] + }, + "skip": "FIXME" +} diff --git a/test/integrations/sources/adjust/data.ts b/test/integrations/sources/adjust/data.ts index 916fd924eb6..947c7028910 100644 --- a/test/integrations/sources/adjust/data.ts +++ b/test/integrations/sources/adjust/data.ts @@ -207,6 +207,51 @@ export const data = [ defaultMockFns(); }, }, + { + name: 'adjust', + description: 'Simple track call with no query parameters v2 version', + module: 'source', + version: 'v2', + skipGo: 'FIXME', + input: { + request: { + body: [ + { + request: { + body: '{"id":"adjust","updated_at":"2023-02-10T12:16:07.251Z","created_at":"2023-02-10T12:05:04.402Z"}', + }, + source: {}, + }, + ], + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Query_parameters is missing', + statTags: { + destinationId: 'Non determinable', + errorCategory: 'transformation', + implementation: 'native', + module: 'source', + workspaceId: 'Non determinable', + }, + statusCode: 400, + }, + ], + }, + }, + mockFns: () => { + defaultMockFns(); + }, + }, { name: 'adjust', description: 'Simple track call with wrong created at', @@ -263,4 +308,58 @@ export const data = [ defaultMockFns(); }, }, + { + name: 'adjust', + description: 'Simple track call with wrong created at v2 version', + module: 'source', + version: 'v2', + skipGo: 'FIXME', + input: { + request: { + body: [ + { + request: { + body: '{"id":"adjust","updated_at":"2023-02-10T12:16:07.251Z","created_at":"test"}', + query_parameters: { + gps_adid: ['38400000-8cf0-11bd-b23e-10b96e40000d'], + adid: ['18546f6171f67e29d1cb983322ad1329'], + tracker_token: ['abc'], + custom: ['custom'], + tracker_name: ['dummy'], + created_at: ['test'], + event_name: ['Click'], + }, + }, + source: {}, + }, + ], + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Failed to parse timestamp: "test"', + statTags: { + destinationId: 'Non determinable', + errorCategory: 'transformation', + implementation: 'native', + module: 'source', + workspaceId: 'Non determinable', + }, + statusCode: 400, + }, + ], + }, + }, + mockFns: () => { + defaultMockFns(); + }, + }, ];