Skip to content

Commit

Permalink
chore: adjust v2 test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayteki95 committed Feb 6, 2025
1 parent 580029b commit 961592d
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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"
}
Original file line number Diff line number Diff line change
@@ -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"
}
99 changes: 99 additions & 0 deletions test/integrations/sources/adjust/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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();
},
},
];

0 comments on commit 961592d

Please sign in to comment.