From dbed502bec4b550b3df40e0714d937bf3c93a928 Mon Sep 17 00:00:00 2001 From: Frostebite Date: Fri, 7 Oct 2022 01:33:07 +0100 Subject: [PATCH] Fix: custom hook files and test --- game-ci/hooks/my-test-hook-post-build.yaml | 4 ++-- game-ci/hooks/my-test-hook-pre-build.yaml | 4 ++-- .../tests/cloud-runner-run-once-custom-hooks.test.ts | 8 ++++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/game-ci/hooks/my-test-hook-post-build.yaml b/game-ci/hooks/my-test-hook-post-build.yaml index dfe5a16b..1dbc2719 100644 --- a/game-ci/hooks/my-test-hook-post-build.yaml +++ b/game-ci/hooks/my-test-hook-post-build.yaml @@ -1,3 +1,3 @@ -hook: post-build +hook: after-build run: | - post-build test! + after-build test! diff --git a/game-ci/hooks/my-test-hook-pre-build.yaml b/game-ci/hooks/my-test-hook-pre-build.yaml index 4637e9ce..ede6dc14 100644 --- a/game-ci/hooks/my-test-hook-pre-build.yaml +++ b/game-ci/hooks/my-test-hook-pre-build.yaml @@ -1,3 +1,3 @@ -hook: pre-build +hook: before-build run: | - pre-build test! + before-build test! diff --git a/src/model/cloud-runner/tests/cloud-runner-run-once-custom-hooks.test.ts b/src/model/cloud-runner/tests/cloud-runner-run-once-custom-hooks.test.ts index 2eaeddb8..d17f7895 100644 --- a/src/model/cloud-runner/tests/cloud-runner-run-once-custom-hooks.test.ts +++ b/src/model/cloud-runner/tests/cloud-runner-run-once-custom-hooks.test.ts @@ -33,12 +33,16 @@ describe('Cloud Runner Custom Hooks', () => { CloudRunnerLogger.log(`run 2 succeeded`); const build2ContainsBuildSucceeded = results2.includes('Build succeeded'); - const build2ContainsPreBuildHookMessage = results2.includes('pre-build test!'); - const build2ContainsPostBuildHookMessage = results2.includes('post-build test!'); + const build2ContainsPreBuildHookMessage = results2.includes('RunCustomHookFiles: before-build'); + const build2ContainsPostBuildHookMessage = results2.includes('RunCustomHookFiles: after-build'); + const build2ContainsPreBuildHookRunMessage = results2.includes('pre-build test!'); + const build2ContainsPostBuildHookRunMessage = results2.includes('post-build test!'); expect(build2ContainsBuildSucceeded).toBeTruthy(); expect(build2ContainsPreBuildHookMessage).toBeTruthy(); expect(build2ContainsPostBuildHookMessage).toBeTruthy(); + expect(build2ContainsPreBuildHookRunMessage).toBeTruthy(); + expect(build2ContainsPostBuildHookRunMessage).toBeTruthy(); }, 10000000); } });