Skip to content

Commit

Permalink
fix: tests - 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed Jul 29, 2024
1 parent 056982f commit 8a3c501
Show file tree
Hide file tree
Showing 68 changed files with 515 additions and 161 deletions.
2 changes: 1 addition & 1 deletion go/webhook/testcases/testcases.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Request struct {
type Output struct {
Response Response
Queue []json.RawMessage
ErrQueue []json.RawMessage `json:"err_queue"`
ErrQueue []json.RawMessage `json:"errQueue"`
}

type Response struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"body": {
"id": "adjust",
"query_parameters": {
"gps_adid": "38400000-8cf0-11bd-b23e-10b96e40000d",
"adid": "18546f6171f67e29d1cb983322ad1329",
"tracker_token": "abc",
"custom": "custom",
"tracker_name": "dummy",
"created_at": "1404214665",
"event_name": "Click"
"gps_adid": ["38400000-8cf0-11bd-b23e-10b96e40000d"],
"adid": ["18546f6171f67e29d1cb983322ad1329"],
"tracker_token": ["abc"],
"custom": ["custom"],
"tracker_name": ["dummy"],
"created_at": ["1404214665"],
"event_name": ["Click"]
},
"updated_at": "2023-02-10T12:16:07.251Z",
"created_at": "2023-02-10T12:05:04.402Z"
Expand All @@ -30,6 +30,7 @@
},
"queue": [
{
"anonymousId": "97fcd7b2-cc24-47d7-b776-057b7b199513",
"context": {
"library": {
"name": "unknown",
Expand All @@ -55,7 +56,6 @@
"custom": "custom",
"tracker_name": "dummy"
},
"anonymousId": "97fcd7b2-cc24-47d7-b776-057b7b199513",
"receivedAt": "2024-03-03T04:48:29.000Z",
"request_ip": "192.0.2.30",
"messageId": "00000000-0000-0000-0000-000000000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"headers": {
"Content-Type": "application/json"
}
},
"method": "GET"
}
},
"output": {
Expand All @@ -19,7 +20,13 @@
"body": "Query_parameters is missing"
},
"queue": [],
"errQueue": [null]
"errQueue": [
{
"id": "adjust",
"updated_at": "2023-02-10T12:16:07.251Z",
"created_at": "2023-02-10T12:05:04.402Z"
}
]
},
"skip": "FIXME"
}
120 changes: 117 additions & 3 deletions go/webhook/testcases/testdata/testcases/appsflyer/test_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,124 @@
},
"output": {
"response": {
"status": 200,
"body": "OK"
"status": 400,
"body": "Unknwon event type from Appsflyer\n"
},
"queue": [],
"errQueue": []
"errQueue": [
{
"idfv": "868049A3-4B2F-4A11-9B00-CFFC362XXXXX",
"device_category": "phone",
"af_sub1": null,
"customer_user_id": "[email protected]",
"is_lat": null,
"contributor_2_af_prt": null,
"bundle_id": "com.appsflyer.AppsFlyer",
"gp_broadcast_referrer": "",
"contributor_2_touch_time": null,
"contributor_3_touch_type": null,
"event_source": "SDK",
"af_cost_value": null,
"contributor_1_match_type": null,
"app_version": "1.4.1",
"contributor_3_af_prt": null,
"custom_data": null,
"contributor_2_touch_type": null,
"gp_install_begin": null,
"city": "Khu Pho Binh Hoa",
"amazon_aid": null,
"gp_referrer": null,
"af_cost_model": null,
"af_c_id": null,
"attributed_touch_time_selected_timezone": null,
"selected_currency": "USD",
"app_name": "AppsFlyer",
"install_time_selected_timezone": "2019-01-20 04:51:16.000+0000",
"postal_code": "823941",
"wifi": true,
"install_time": "2019-01-20 04:51:16.000",
"operator": null,
"attributed_touch_type": null,
"af_attribution_lookback": null,
"campaign_type": null,
"keyword_match_type": null,
"af_adset_id": null,
"device_download_time_selected_timezone": "2019-01-20 04:51:16.000+0000",
"contributor_2_media_source": null,
"conversion_type": null,
"contributor_2_match_type": null,
"api_version": "2.0",
"attributed_touch_time": null,
"revenue_in_selected_currency": null,
"is_retargeting": false,
"country_code": "VN",
"gp_click_time": null,
"contributor_1_af_prt": null,
"match_type": null,
"appsflyer_id": "1547985076649-5309999",
"dma": "None",
"http_referrer": null,
"af_sub5": null,
"af_prt": null,
"event_revenue_currency": "USD",
"store_reinstall": null,
"install_app_store": null,
"media_source": "organic",
"deeplink_url": null,
"campaign": null,
"af_keywords": null,
"region": "AS",
"cost_in_selected_currency": null,
"event_value": "{}",
"ip": "1.1.1.1",
"oaid": null,
"event_time": "2020-01-15 14:57:24.898",
"is_receipt_validated": null,
"contributor_1_campaign": null,
"af_sub4": null,
"imei": null,
"contributor_3_campaign": null,
"event_revenue_usd": null,
"af_sub2": null,
"original_url": null,
"contributor_2_campaign": null,
"android_id": null,
"contributor_3_media_source": null,
"af_adset": null,
"af_ad": null,
"state": "57",
"network_account_id": null,
"device_type": "iPhoneXR",
"idfa": "A7071198-3848-40A5-B3D0-94578D9BZZZZ",
"retargeting_conversion_type": null,
"af_channel": null,
"af_cost_currency": null,
"contributor_1_media_source": null,
"keyword_id": null,
"device_download_time": "2019-01-20 04:51:16.000",
"contributor_1_touch_type": null,
"af_reengagement_window": null,
"af_siteid": null,
"language": "en-US",
"app_id": "id1217828636",
"contributor_1_touch_time": null,
"event_revenue": null,
"af_ad_type": null,
"carrier": null,
"af_sub_siteid": null,
"advertising_id": null,
"os_version": "12.3.1",
"platform": "ios",
"af_sub3": null,
"contributor_3_match_type": null,
"selected_timezone": "UTC",
"af_ad_id": null,
"contributor_3_touch_time": null,
"user_agent": "AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0",
"is_primary_attribution": true,
"sdk_version": "v4.10.0",
"event_time_selected_timezone": "2020-01-15 14:57:24.898+0000"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
}
},
"body": {
"members": ["auth0|123456"]
"members": [
"auth0|123456"
]
},
"path": "/api/v2/organizations/org_eoe8p2atZ7furBxg/members",
"query": {},
Expand Down Expand Up @@ -93,7 +95,9 @@
}
},
"body": {
"members": ["auth0|123456"]
"members": [
"auth0|123456"
]
},
"path": "/api/v2/organizations/org_eoe8p2atZ7furBxg/members",
"query": {},
Expand Down Expand Up @@ -121,6 +125,5 @@
}
],
"errQueue": []
},
"skip": "dynamic anonymousId"
}
}
}
11 changes: 5 additions & 6 deletions go/webhook/testcases/testdata/testcases/auth0/empty_batch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
},
"output": {
"response": {
"status": 200,
"body": "OK"
"status": 400,
"body": "Empty batch payload\n"
},
"queue": [],
"errQueue": []
},
"skip": "dynamic anonymousId"
}
"errQueue": [[]]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,5 @@
}
],
"errQueue": []
},
"skip": "dynamic anonymousId"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,5 @@
}
],
"errQueue": []
},
"skip": "dynamic anonymousId"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,5 @@
}
],
"errQueue": []
},
"skip": "dynamic anonymousId"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@
"support_url": "",
"friendly_name": "mecro-action",
"support_email": "[email protected]",
"enabled_locales": ["en"],
"enabled_locales": [
"en"
],
"sandbox_version": "16",
"universal_login": {}
},
Expand Down Expand Up @@ -459,7 +461,9 @@
"support_url": "",
"friendly_name": "mecro-action",
"support_email": "[email protected]",
"enabled_locales": ["en"],
"enabled_locales": [
"en"
],
"sandbox_version": "16",
"universal_login": {}
},
Expand Down Expand Up @@ -552,6 +556,5 @@
}
],
"errQueue": []
},
"skip": "dynamic anonymousId"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,6 @@
}
],
"errQueue": []
}
},
"skip": "FIXME"
}
Loading

0 comments on commit 8a3c501

Please sign in to comment.