From a46b5164da597eb43085d7edae0488259cf77e04 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Sun, 19 Jan 2025 19:13:48 +0100 Subject: [PATCH] test(github): generate random filename Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- __tests__/github.test.itg.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/__tests__/github.test.itg.ts b/__tests__/github.test.itg.ts index 7a3a7188..5d80aa5b 100644 --- a/__tests__/github.test.itg.ts +++ b/__tests__/github.test.itg.ts @@ -33,8 +33,10 @@ const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'tr maybe('uploadArtifact', () => { it('uploads an artifact', async () => { + const filename = path.join(tmpDir, `github-repo-${Util.generateRandomString()}.json`); + fs.copyFileSync(path.join(fixturesDir, `github-repo.json`), filename); const res = await GitHub.uploadArtifact({ - filename: path.join(fixturesDir, 'github-repo.json'), + filename: filename, mimeType: 'application/json', retentionDays: 1 });