From d9bd2d45ba633e761e6ebb26b881832e5309fe0c Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Mon, 20 Jan 2025 15:40:14 +0100 Subject: [PATCH] test: increase timeout for binary download Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- __tests__/buildx/install.test.ts | 26 +++++++++++++++----------- __tests__/compose/install.test.ts | 28 ++++++++++++++++------------ 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/__tests__/buildx/install.test.ts b/__tests__/buildx/install.test.ts index 945a381..de6e9b9 100644 --- a/__tests__/buildx/install.test.ts +++ b/__tests__/buildx/install.test.ts @@ -57,22 +57,26 @@ describe('download', () => { ['v0.9.0'], ['v0.10.5'], ])( - 'acquires %p of buildx with cache', async (version) => { - const install = new Install({standalone: false}); - const toolPath = await install.download(version); - expect(fs.existsSync(toolPath)).toBe(true); - }); + 'acquires %p of buildx with cache', async (version) => { + const install = new Install({standalone: false}); + const toolPath = await install.download(version); + expect(fs.existsSync(toolPath)).toBe(true); + }, + 100000 + ); // prettier-ignore test.each([ ['v0.11.2'], ['v0.12.0'], ])( - 'acquires %p of buildx without cache', async (version) => { - const install = new Install({standalone: false}); - const toolPath = await install.download(version, true); - expect(fs.existsSync(toolPath)).toBe(true); - }); + 'acquires %p of buildx without cache', async (version) => { + const install = new Install({standalone: false}); + const toolPath = await install.download(version, true); + expect(fs.existsSync(toolPath)).toBe(true); + }, + 100000 + ); // TODO: add tests for arm // prettier-ignore @@ -86,7 +90,7 @@ describe('download', () => { ['linux', 'ppc64'], ['linux', 's390x'], ])( - 'acquires buildx for %s/%s', async (os, arch) => { + 'acquires buildx for %s/%s', async (os, arch) => { jest.spyOn(osm, 'platform').mockImplementation(() => os as NodeJS.Platform); jest.spyOn(osm, 'arch').mockImplementation(() => arch); const install = new Install(); diff --git a/__tests__/compose/install.test.ts b/__tests__/compose/install.test.ts index e30d059..af8e28f 100644 --- a/__tests__/compose/install.test.ts +++ b/__tests__/compose/install.test.ts @@ -36,7 +36,7 @@ describe('download', () => { ['v2.32.4', true], ['latest', true] ])( - 'acquires %p of compose (standalone: %p)', async (version, standalone) => { + 'acquires %p of compose (standalone: %p)', async (version, standalone) => { const install = new Install({standalone: standalone}); const toolPath = await install.download(version); expect(fs.existsSync(toolPath)).toBe(true); @@ -57,22 +57,26 @@ describe('download', () => { ['v2.31.0'], ['v2.32.4'], ])( - 'acquires %p of compose with cache', async (version) => { - const install = new Install({standalone: false}); - const toolPath = await install.download(version); - expect(fs.existsSync(toolPath)).toBe(true); - }); + 'acquires %p of compose with cache', async (version) => { + const install = new Install({standalone: false}); + const toolPath = await install.download(version); + expect(fs.existsSync(toolPath)).toBe(true); + }, + 100000 + ); // prettier-ignore test.each([ ['v2.27.1'], ['v2.28.0'], ])( - 'acquires %p of compose without cache', async (version) => { - const install = new Install({standalone: false}); - const toolPath = await install.download(version, true); - expect(fs.existsSync(toolPath)).toBe(true); - }); + 'acquires %p of compose without cache', async (version) => { + const install = new Install({standalone: false}); + const toolPath = await install.download(version, true); + expect(fs.existsSync(toolPath)).toBe(true); + }, + 100000 + ); // TODO: add tests for arm // prettier-ignore @@ -86,7 +90,7 @@ describe('download', () => { ['linux', 'ppc64'], ['linux', 's390x'], ])( - 'acquires compose for %s/%s', async (os, arch) => { + 'acquires compose for %s/%s', async (os, arch) => { jest.spyOn(osm, 'platform').mockImplementation(() => os as NodeJS.Platform); jest.spyOn(osm, 'arch').mockImplementation(() => arch); const install = new Install();