Skip to content

Commit

Permalink
chore: tc corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandra shekar Varkala committed Jan 11, 2024
1 parent 7b91095 commit 9a4afee
Show file tree
Hide file tree
Showing 2 changed files with 152 additions and 31 deletions.
3 changes: 2 additions & 1 deletion test/integrations/destinations/am/batch/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export const data = [
{
batched: false,
error: 'Both userId and deviceId cannot be undefined',
metadata: [{ job_id: 1, userId: 'u1' }],
//TODO: fix this. metadata should be an array
metadata: { job_id: 1, userId: 'u1' },
statTags: { errorCategory: 'dataValidation', errorType: 'instrumentation' },
statusCode: 400,
},
Expand Down
180 changes: 150 additions & 30 deletions test/integrations/destinations/bqstream/router/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,18 @@ export const data = [
type: 'track',
event: 'insert product',
userId: 'user12345',
properties: { count: 10, productId: 10, productName: 'Product-10' },

properties: {
count: 10,
productId: 10,
productName: 'Product-10',
},
anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf',
},
metadata: { jobId: 1, userId: 'u1' },
metadata: {
jobId: 1,
userId: 'user12345',
},
destination: {
Config: {
rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-',
Expand All @@ -28,6 +36,7 @@ export const data = [
eventDelivery: true,
eventDeliveryTS: 1636965406397,
},

ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR',
Name: 'bqstream test',
},
Expand All @@ -37,9 +46,16 @@ export const data = [
type: 'track',
event: 'insert product',
userId: 'user12345',
properties: { count: 20, productId: 20, productName: 'Product-20' },
properties: {
count: 20,
productId: 20,
productName: 'Product-20',
},
},
metadata: {
jobId: 2,
userId: 'user12345',
},
metadata: { jobId: 2, userId: 'u1' },
destination: {
Config: {
rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-',
Expand All @@ -50,6 +66,7 @@ export const data = [
eventDelivery: true,
eventDeliveryTS: 1636965406397,
},

ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR',
Name: 'bqstream test',
},
Expand All @@ -59,10 +76,17 @@ export const data = [
type: 'identify',
event: 'insert product',
userId: 'user12345',
traits: { count: 20, productId: 20, productName: 'Product-20' },
traits: {
count: 20,
productId: 20,
productName: 'Product-20',
},
anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf',
},
metadata: { jobId: 3, userId: 'u1' },
metadata: {
jobId: 3,
userId: 'user12345',
},
destination: {
Config: {
rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-',
Expand All @@ -73,6 +97,7 @@ export const data = [
eventDelivery: true,
eventDeliveryTS: 1636965406397,
},

ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR',
Name: 'bqstream test',
},
Expand All @@ -82,10 +107,17 @@ export const data = [
type: 'track',
event: 'insert product',
userId: 'user12345',
properties: { count: 20, productId: 20, productName: 'Product-20' },
properties: {
count: 20,
productId: 20,
productName: 'Product-20',
},
anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf',
},
metadata: { jobId: 5, userId: 'u1' },
metadata: {
jobId: 5,
userId: 'user123',
},
destination: {
Config: {
rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-',
Expand All @@ -96,6 +128,7 @@ export const data = [
eventDelivery: true,
eventDeliveryTS: 1636965406397,
},

ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR',
Name: 'bqstream test',
},
Expand All @@ -105,10 +138,17 @@ export const data = [
type: 'track',
event: 'insert product',
userId: 'user12345',
properties: { count: 20, productId: 20, productName: 'Product-20' },
properties: {
count: 20,
productId: 20,
productName: 'Product-20',
},
anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf',
},
metadata: { jobId: 6, userId: 'u1' },
metadata: {
jobId: 6,
userId: 'user124',
},
destination: {
Config: {
rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-',
Expand All @@ -119,13 +159,22 @@ export const data = [
eventDelivery: true,
eventDeliveryTS: 1636965406397,
},

ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR',
Name: 'bqstream test',
},
},
{
message: { type: 'track', event: 'insert product', userId: 'user12345' },
metadata: { jobId: 7, userId: 'u1' },
message: {
type: 'track',
event: 'insert product',

userId: 'user12345',
},
metadata: {
jobId: 7,
userId: 'user124',
},
destination: {
Config: {
rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-',
Expand All @@ -136,13 +185,21 @@ export const data = [
eventDelivery: true,
eventDeliveryTS: 1636965406397,
},

ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR',
Name: 'bqstream test',
},
},
{
message: { type: 'track', event: 'insert product', userId: 'user12345' },
metadata: { jobId: 8, userId: 'u1' },
message: {
type: 'track',
event: 'insert product',
userId: 'user12345',
},
metadata: {
jobId: 8,
userId: 'user125',
},
destination: {
Config: {
rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-',
Expand All @@ -153,6 +210,7 @@ export const data = [
eventDelivery: true,
eventDeliveryTS: 1636965406397,
},

ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR',
Name: 'bqstream test',
},
Expand All @@ -161,9 +219,14 @@ export const data = [
message: {
type: 'identify',
event: 'insert product',

userId: 'user12345',

context: {
os: { Name: '', version: '' },
os: {
Name: '',
version: '',
},
app: {
Name: 'RudderLabs JavaScript SDK',
build: '1.0.0',
Expand All @@ -190,16 +253,27 @@ export const data = [
innerHeight: 776,
},
traits: {},
library: { Name: 'RudderLabs JavaScript SDK', version: '1.1.18' },
library: {
Name: 'RudderLabs JavaScript SDK',
version: '1.1.18',
},
campaign: {},
userAgent:
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36',
},
traits: { count: 20, productId: 20, productName: 'Product-20' },

traits: {
count: 20,
productId: 20,
productName: 'Product-20',
},
receivedAt: '2021-11-15T14:06:42.497+05:30',
anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf',
},
metadata: { jobId: 9, userId: 'u1' },
metadata: {
jobId: 9,
userId: 'user125',
},
destination: {
Config: {
rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-',
Expand All @@ -210,6 +284,7 @@ export const data = [
eventDelivery: true,
eventDeliveryTS: 1636965406397,
},

ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR',
Name: 'bqstream test',
},
Expand All @@ -231,10 +306,30 @@ export const data = [
datasetId: 'gc_dataset',
projectId: 'gc-project-id',
properties: [
{ count: 10, insertId: '10', productId: 10, productName: 'Product-10' },
{ count: 20, insertId: '20', productId: 20, productName: 'Product-20' },
{ count: 20, insertId: '20', productId: 20, productName: 'Product-20' },
{ count: 20, insertId: '20', productId: 20, productName: 'Product-20' },
{
count: 10,
insertId: '10',
productId: 10,
productName: 'Product-10',
},
{
count: 20,
insertId: '20',
productId: 20,
productName: 'Product-20',
},
{
count: 20,
insertId: '20',
productId: 20,
productName: 'Product-20',
},
{
count: 20,
insertId: '20',
productId: 20,
productName: 'Product-20',
},
],
tableId: 'gc_table',
},
Expand All @@ -252,10 +347,22 @@ export const data = [
Name: 'bqstream test',
},
metadata: [
{ jobId: 1, userId: 'u1' },
{ jobId: 2, userId: 'u1' },
{ jobId: 5, userId: 'u1' },
{ jobId: 6, userId: 'u1' },
{
jobId: 1,
userId: 'user12345',
},
{
jobId: 2,
userId: 'user12345',
},
{
jobId: 5,
userId: 'user123',
},
{
jobId: 6,
userId: 'user124',
},
],
statusCode: 200,
},
Expand All @@ -276,8 +383,14 @@ export const data = [
},
error: 'Invalid payload for the destination',
metadata: [
{ jobId: 7, userId: 'u1' },
{ jobId: 8, userId: 'u1' },
{
jobId: 7,
userId: 'user124',
},
{
jobId: 8,
userId: 'user125',
},
],
statTags: {
destType: 'BQSTREAM',
Expand All @@ -304,10 +417,17 @@ export const data = [
ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR',
Name: 'bqstream test',
},

error: 'Message Type not supported: identify',
metadata: [
{ jobId: 3, userId: 'u1' },
{ jobId: 9, userId: 'u1' },
{
jobId: 3,
userId: 'user12345',
},
{
jobId: 9,
userId: 'user125',
},
],
statTags: {
destType: 'BQSTREAM',
Expand Down

0 comments on commit 9a4afee

Please sign in to comment.