From faac0ee484fe9d3b5d020c60b9115130e2efafe5 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Fri, 5 Oct 2018 12:20:59 +0200 Subject: [PATCH] tests: fix go.mod filename in artifacts --- test/manager/gomod/artifacts.spec.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/manager/gomod/artifacts.spec.js b/test/manager/gomod/artifacts.spec.js index f4d98b0213..22c13bee33 100644 --- a/test/manager/gomod/artifacts.spec.js +++ b/test/manager/gomod/artifacts.spec.js @@ -14,7 +14,7 @@ describe('.getArtifacts()', () => { jest.resetAllMocks(); }); it('returns if no go.sum found', async () => { - expect(await gomod.getArtifacts('gomod.json', [], '{}', config)).toBeNull(); + expect(await gomod.getArtifacts('go.mod', [], '{}', config)).toBeNull(); }); it('returns null if unchanged', async () => { platform.getFile.mockReturnValueOnce('Current go.sum'); @@ -23,7 +23,7 @@ describe('.getArtifacts()', () => { stderror: '', }); fs.readFile = jest.fn(() => 'Current go.sum'); - expect(await gomod.getArtifacts('gomod.json', [], '{}', config)).toBeNull(); + expect(await gomod.getArtifacts('go.mod', [], '{}', config)).toBeNull(); }); it('returns updated go.sum', async () => { platform.getFile.mockReturnValueOnce('Current go.sum'); @@ -32,9 +32,7 @@ describe('.getArtifacts()', () => { stderror: '', }); fs.readFile = jest.fn(() => 'New go.sum'); - expect( - await gomod.getArtifacts('gomod.json', [], '{}', config) - ).not.toBeNull(); + expect(await gomod.getArtifacts('go.mod', [], '{}', config)).not.toBeNull(); }); it('supports docker mode', async () => { platform.getFile.mockReturnValueOnce('Current go.sum'); @@ -44,7 +42,7 @@ describe('.getArtifacts()', () => { }); fs.readFile = jest.fn(() => 'New go.sum'); expect( - await gomod.getArtifacts('gomod.json', [], '{}', { + await gomod.getArtifacts('go.mod', [], '{}', { ...config, binarySource: 'docker', }) -- GitLab