From 7e934e489e3630f0864b17b3345375a78d4b1925 Mon Sep 17 00:00:00 2001 From: Leanne Date: Thu, 6 Jan 2022 14:51:59 +0000 Subject: [PATCH] remove references to n-cluster --- test/commands/contents.test.js | 10 +++++----- test/lib/ebi/contents-search.test.js | 30 ++++++++++++++-------------- test/lib/get-contents.test.js | 4 ++-- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/test/commands/contents.test.js b/test/commands/contents.test.js index 3e66605..4d13ca6 100644 --- a/test/commands/contents.test.js +++ b/test/commands/contents.test.js @@ -163,7 +163,7 @@ describe('contents command handler', () => { test('when contents handler is called with valid and values, a list of repositories are logged', async () => { nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); @@ -179,7 +179,7 @@ describe('contents command handler', () => { test('when contents handler is called with valid and and values, a list of repositories are logged', async () => { nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); @@ -210,7 +210,7 @@ describe('contents command handler', () => { test('empty `contents` search, logs existence of file', async () => { nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); @@ -254,7 +254,7 @@ describe('contents command handler', () => { test(' value not found, does not log (with verbose flag)', async () => { nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); @@ -472,7 +472,7 @@ describe.each([ repos.forEach(repo => { nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); }); diff --git a/test/lib/ebi/contents-search.test.js b/test/lib/ebi/contents-search.test.js index 9819d5c..57803f1 100644 --- a/test/lib/ebi/contents-search.test.js +++ b/test/lib/ebi/contents-search.test.js @@ -37,7 +37,7 @@ describe('contentsSearch resultsAsync', () => { const repo = 'Financial-Times/ebi'; nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); @@ -50,7 +50,7 @@ describe('contentsSearch resultsAsync', () => { await expect(result).resolves.toEqual({ filepath: 'Procfile', - fileContents: 'web: n-cluster server/init.js', + fileContents: 'web: node --max-http-header-size=80000 server/cluster.js', regex: undefined, repository: 'Financial-Times/ebi', search: 'web:', @@ -62,7 +62,7 @@ describe('contentsSearch resultsAsync', () => { const repo = 'Financial-Times/ebi'; nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); @@ -75,7 +75,7 @@ describe('contentsSearch resultsAsync', () => { await expect(result).resolves.toEqual({ filepath: 'Procfile', - fileContents: 'web: n-cluster server/init.js', + fileContents: 'web: node --max-http-header-size=80000 server/cluster.js', regex: 'w..:', repository: 'Financial-Times/ebi', search: undefined, @@ -87,7 +87,7 @@ describe('contentsSearch resultsAsync', () => { const repo = 'Financial-Times/ebi'; nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); @@ -101,7 +101,7 @@ describe('contentsSearch resultsAsync', () => { await expect(result).resolves.toEqual({ filepath: 'Procfile', - fileContents: 'web: n-cluster server/init.js', + fileContents: 'web: node --max-http-header-size=80000 server/cluster.js', regex: 'w..:', repository: 'Financial-Times/ebi', search: 'nope', @@ -113,12 +113,12 @@ describe('contentsSearch resultsAsync', () => { const repo = 'Financial-Times/ebi'; nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); const ebiSearch = contentsSearch({ - search: 'node', + search: 'worker', filepath: 'Procfile' }); const { resultsAsync } = await ebiSearch([repo]); @@ -126,12 +126,12 @@ describe('contentsSearch resultsAsync', () => { await expect(result).resolves.toEqual({ message: - "INFO: 'Procfile' has no match for 'node' in 'Financial-Times/ebi'", + "INFO: 'Procfile' has no match for 'worker' in 'Financial-Times/ebi'", filepath: 'Procfile', - fileContents: 'web: n-cluster server/init.js', + fileContents: 'web: node --max-http-header-size=80000 server/cluster.js', regex: undefined, repository: 'Financial-Times/ebi', - search: 'node', + search: 'worker', type: RESULT_TYPES.noMatch }); }); @@ -164,7 +164,7 @@ describe('contentsSearch getResults', () => { const repo = 'Financial-Times/ebi'; nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); @@ -182,7 +182,7 @@ describe('contentsSearch getResults', () => { const expectedResult = { filepath: 'Procfile', - fileContents: 'web: n-cluster server/init.js', + fileContents: 'web: node --max-http-header-size=80000 server/cluster.js', regex: undefined, repository: 'Financial-Times/ebi', search: 'web:', @@ -199,7 +199,7 @@ describe('contentsSearch getResults', () => { const repo = 'Financial-Times/ebi'; nockScope.get(`/${repo}/contents/Procfile`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); @@ -217,7 +217,7 @@ describe('contentsSearch getResults', () => { const expectedResult = { filepath: 'Procfile', - fileContents: 'web: n-cluster server/init.js', + fileContents: 'web: node --max-http-header-size=80000 server/cluster.js', regex: undefined, repository: 'Financial-Times/ebi', message: diff --git a/test/lib/get-contents.test.js b/test/lib/get-contents.test.js index 6721573..ae254f1 100644 --- a/test/lib/get-contents.test.js +++ b/test/lib/get-contents.test.js @@ -20,14 +20,14 @@ describe('getContents', () => { const filepath = 'Procfile'; nockScope.get(`/${repo}/contents/${filepath}`).reply(200, { type: 'file', - content: base64Encode('web: n-cluster server/init.js'), + content: base64Encode('web: node --max-http-header-size=80000 server/cluster.js'), path: 'Procfile' }); const getPathContents = getContents({ filepath, githubToken: '123' }); - expect(await getPathContents(repo)).toContain('web: n-cluster'); + expect(await getPathContents(repo)).toContain('web: node --max-http-header-size=80000 server/cluster.js'); }); test('when repository not found correct error is thrown', async () => {