Skip to content

Commit

Permalink
fix: run 404 rum sources query with interval 7
Browse files Browse the repository at this point in the history
  • Loading branch information
alinarublea committed Jan 30, 2024
1 parent 30ff924 commit 135172c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions packages/spacecat-shared-rum-api-client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ 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 () => {
nock('https://helix-pages.anywhere.run/helix-services')
.get('/run-query@v3/rum-sources')
.query({
domainkey: 'hebele',
interval: 1,
interval: 7,
offset: 0,
limit: 101,
checkpoint: 404,
Expand Down

0 comments on commit 135172c

Please sign in to comment.