From 135172c56b0f05f6574f165e5eb0ce566a4c376a Mon Sep 17 00:00:00 2001 From: alinarublea Date: Tue, 30 Jan 2024 10:33:52 +0100 Subject: [PATCH] fix: run 404 rum sources query with interval 7 --- packages/spacecat-shared-rum-api-client/src/index.js | 4 +--- .../test/rum-api-client.test.js | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/spacecat-shared-rum-api-client/src/index.js b/packages/spacecat-shared-rum-api-client/src/index.js index e9736298..3107c625 100644 --- a/packages/spacecat-shared-rum-api-client/src/index.js +++ b/packages/spacecat-shared-rum-api-client/src/index.js @@ -37,9 +37,7 @@ export const RUM_DEFAULT_PARAMS = { }; export const NOT_FOUND_DEFAULT_PARAMS = { - interval: 1, - offset: 0, - limit: 101, + ...RUM_DEFAULT_PARAMS, checkpoint: 404, }; diff --git a/packages/spacecat-shared-rum-api-client/test/rum-api-client.test.js b/packages/spacecat-shared-rum-api-client/test/rum-api-client.test.js index c5b7f8d6..28990bee 100644 --- a/packages/spacecat-shared-rum-api-client/test/rum-api-client.test.js +++ b/packages/spacecat-shared-rum-api-client/test/rum-api-client.test.js @@ -94,7 +94,7 @@ describe('rum api client', () => { it('returns the URL to call the get404Sources', () => { const rumApiClient = RUMAPIClient.createFrom({ env: { RUM_DOMAIN_KEY: 'hebele' } }); expect(rumApiClient.create404URL({ url: 'http://spacecar.com' })) - .to.eql('https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-sources?domainkey=hebele&interval=1&offset=0&limit=101&checkpoint=404&url=http%3A%2F%2Fspacecar.com'); + .to.eql('https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-sources?domainkey=hebele&interval=7&offset=0&limit=101&checkpoint=404&url=http%3A%2F%2Fspacecar.com'); }); it('returns data when get404Sources api is successful', async () => { @@ -102,7 +102,7 @@ describe('rum api client', () => { .get('/run-query@v3/rum-sources') .query({ domainkey: 'hebele', - interval: 1, + interval: 7, offset: 0, limit: 101, checkpoint: 404,