Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ describe('Survicate Cloud Mode', () => {
}

it('should validate authentication inputs', async () => {
nock('https://integrations.survicate.com').get('/endpoint/segment/check').reply(200, {})
nock('https://hv.survicate.com').get('/integrations/partners/segment/check').reply(200, {})

await expect(testDestination.testAuthentication(authData)).resolves.not.toThrowError()
})

it('should fail on authentication failure', async () => {
nock('https://integrations.survicate.com').get('/endpoint/segment/check').reply(401, {})
nock('https://hv.survicate.com').get('/integrations/partners/segment/check').reply(401, {})

await expect(testDestination.testAuthentication(authData)).rejects.toThrowError()
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('Survicate Cloud Mode - identifyGroup', () => {
timestamp: '2023-10-01T00:00:00Z'
}

nock('https://integrations.survicate.com').post('/endpoint/segment/group', expectedJson).reply(200, {})
nock('https://hv.survicate.com').post('/integrations/partners/segment/group', expectedJson).reply(200, {})

const response = await testDestination.testAction('identifyGroup', {
event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const action: ActionDefinition<Settings, Payload> = {
throw new PayloadValidationError("'User ID' or 'Anonymous ID' is required")
}

return request(`https://integrations.survicate.com/endpoint/segment/group`, {
return request(`https://hv.survicate.com/integrations/partners/segment/group`, {
method: 'post',
json: {
...(user_id ? { user_id } : {}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Survicate Cloud Mode - identifyUser', () => {
}
}

nock('https://integrations.survicate.com').post('/endpoint/segment/identify', expectedJson).reply(200, {})
nock('https://hv.survicate.com').post('/integrations/partners/segment/identify', expectedJson).reply(200, {})

const response = await testDestination.testAction('identifyUser', {
event,
Expand Down Expand Up @@ -75,7 +75,7 @@ describe('Survicate Cloud Mode - identifyUser', () => {
}
}

nock('https://integrations.survicate.com').post('/endpoint/segment/identify', expectedJson).reply(200, {})
nock('https://hv.survicate.com').post('/integrations/partners/segment/identify', expectedJson).reply(200, {})

const response = await testDestination.testAction('identifyUser', {
event,
Expand Down Expand Up @@ -103,7 +103,7 @@ describe('Survicate Cloud Mode - identifyUser', () => {
}
}

nock('https://integrations.survicate.com').post('/endpoint/segment/identify', expectedJson).reply(200, {})
nock('https://hv.survicate.com').post('/integrations/partners/segment/identify', expectedJson).reply(200, {})

const response = await testDestination.testAction('identifyUser', {
event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const action: ActionDefinition<Settings, Payload> = {
throw new PayloadValidationError("'User ID' or 'Anonymous ID' is required")
}

return request(`https://integrations.survicate.com/endpoint/segment/identify`, {
return request(`https://hv.survicate.com/integrations/partners/segment/identify`, {
method: 'post',
json: {
...(user_id ? { user_id } : {}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const destination: DestinationDefinition<Settings> = {
}
},
testAuthentication: async (request, { settings }) => {
return request(`https://integrations.survicate.com/endpoint/segment/check`, {
return request(`https://hv.survicate.com/integrations/partners/segment/check`, {
method: 'get',
headers: {
Authorization: `Bearer ${settings.apiKey}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('Survicate Cloud Mode - trackEvent', () => {
timestamp: '2023-10-01T00:00:00Z'
}

nock('https://integrations.survicate.com').post('/endpoint/segment/track', expectedJson).reply(200, {})
nock('https://hv.survicate.com').post('/integrations/partners/segment/track', expectedJson).reply(200, {})

const response = await testDestination.testAction('trackEvent', {
event,
Expand Down Expand Up @@ -79,7 +79,7 @@ describe('Survicate Cloud Mode - trackEvent', () => {
timestamp: '2023-10-01T00:00:00Z'
}

nock('https://integrations.survicate.com').post('/endpoint/segment/track', expectedJson).reply(200, {})
nock('https://hv.survicate.com').post('/integrations/partners/segment/track', expectedJson).reply(200, {})

const response = await testDestination.testAction('trackEvent', {
event,
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('Survicate Cloud Mode - trackEvent', () => {
timestamp: '2023-10-01T00:00:00Z'
}

nock('https://integrations.survicate.com').post('/endpoint/segment/track', expectedJson).reply(200, {})
nock('https://hv.survicate.com').post('/integrations/partners/segment/track', expectedJson).reply(200, {})

const response = await testDestination.testAction('trackEvent', {
event,
Expand All @@ -133,7 +133,7 @@ describe('Survicate Cloud Mode - trackEvent', () => {
anonymous_id: 'anon123'
}

nock('https://integrations.survicate.com').post('/endpoint/segment/track', expectedJson).reply(200, {})
nock('https://hv.survicate.com').post('/integrations/partners/segment/track', expectedJson).reply(200, {})

const response = await testDestination.testAction('trackEvent', {
event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const action: ActionDefinition<Settings, Payload> = {
throw new PayloadValidationError("'User ID' or 'Anonymous ID' is required")
}

return request(`https://integrations.survicate.com/endpoint/segment/track`, {
return request(`https://hv.survicate.com/integrations/partners/segment/track`, {
method: 'post',
json: {
name,
Expand Down