From d43774902b0c3b274ba052aaefaed63c18165e86 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Mon, 7 Oct 2024 12:49:48 +0200 Subject: [PATCH] backend-defaults: fix GithubUrlReader mocked urls Signed-off-by: Vincenzo Scamporlino --- .../urlReader/lib/GithubUrlReader.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/backend-defaults/src/entrypoints/urlReader/lib/GithubUrlReader.test.ts b/packages/backend-defaults/src/entrypoints/urlReader/lib/GithubUrlReader.test.ts index f1dd7c0dc6..e8d81046ab 100644 --- a/packages/backend-defaults/src/entrypoints/urlReader/lib/GithubUrlReader.test.ts +++ b/packages/backend-defaults/src/entrypoints/urlReader/lib/GithubUrlReader.test.ts @@ -111,7 +111,7 @@ describe('GithubUrlReader', () => { worker.use( rest.get( - 'https://ghe.github.com/api/v3/repos/backstage/mock/tree/contents/', + 'https://ghe.github.com/api/v3/repos/backstage/mock/contents/main', (req, res, ctx) => { expect(req.headers.get('authorization')).toBe( mockHeaders.Authorization, @@ -152,7 +152,7 @@ describe('GithubUrlReader', () => { worker.use( rest.get( - 'https://ghe.github.com/api/v3/repos/backstage/mock/tree/contents/', + 'https://ghe.github.com/api/v3/repos/backstage/mock/contents/main', (req, res, ctx) => { expect(req.headers.get('authorization')).toBe( mockHeaders.Authorization, @@ -188,7 +188,7 @@ describe('GithubUrlReader', () => { worker.use( rest.get( - 'https://ghe.github.com/api/v3/repos/backstage/mock/tree/contents/', + 'https://ghe.github.com/api/v3/repos/backstage/mock/contents/main', (req, res, ctx) => { expect(req.headers.get('authorization')).toBe( mockHeaders.Authorization, @@ -219,7 +219,7 @@ describe('GithubUrlReader', () => { worker.use( rest.get( - 'https://ghe.github.com/api/v3/repos/backstage/mock/tree/contents/', + 'https://ghe.github.com/api/v3/repos/backstage/mock/contents/main', (_req, res, ctx) => { return res( ctx.status(403), @@ -249,7 +249,7 @@ describe('GithubUrlReader', () => { worker.use( rest.get( - 'https://ghe.github.com/api/v3/repos/backstage/mock/tree/contents/', + 'https://ghe.github.com/api/v3/repos/backstage/mock/contents/main', (_req, res, ctx) => { return res( ctx.status(200), @@ -283,7 +283,7 @@ describe('GithubUrlReader', () => { worker.use( rest.get( - 'https://ghe.github.com/api/v3/repos/backstage/mock/tree/contents/', + 'https://ghe.github.com/api/v3/repos/backstage/mock/contents/main', (req, res, ctx) => { expect(req.headers.get('authorization')).toBe( 'Bearer overridentoken',