From 04fab926b56167031a9c548fcd79cd062289c006 Mon Sep 17 00:00:00 2001 From: Jeremy McSpadden Date: Sun, 19 Apr 2026 16:35:32 -0500 Subject: [PATCH] test: add --no-sdk to hook-deployment installer tests Tests #1834, #1924, #2136 exercise hook/artifact deployment and don't care about SDK install. Now that installSdkIfNeeded() failures are fatal, these tests fail on any CI runner without gsd-sdk pre-built because the sdk/ tsc build path runs and can fail in CI env. Pass --no-sdk so each test focuses on its actual subject. SDK install path has dedicated end-to-end coverage in install-smoke.yml. --- tests/bug-1834-sh-hooks-installed.test.cjs | 5 ++++- tests/bug-1924-preserve-user-artifacts.test.cjs | 4 +++- tests/bug-2136-sh-hook-version.test.cjs | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/bug-1834-sh-hooks-installed.test.cjs b/tests/bug-1834-sh-hooks-installed.test.cjs index 1fa19fefc..cfca61666 100644 --- a/tests/bug-1834-sh-hooks-installed.test.cjs +++ b/tests/bug-1834-sh-hooks-installed.test.cjs @@ -58,7 +58,10 @@ function cleanup(dir) { * Returns the path to the installed hooks directory. */ function runInstaller(configDir) { - execFileSync(process.execPath, [INSTALL_SCRIPT, '--claude', '--global', '--yes'], { + // --no-sdk: this test covers hook deployment only; skip SDK build to avoid + // flakiness and keep the test fast (SDK install path has dedicated coverage + // in install-smoke.yml). + execFileSync(process.execPath, [INSTALL_SCRIPT, '--claude', '--global', '--yes', '--no-sdk'], { encoding: 'utf-8', stdio: 'pipe', env: { diff --git a/tests/bug-1924-preserve-user-artifacts.test.cjs b/tests/bug-1924-preserve-user-artifacts.test.cjs index 438dc9c5e..b707baaa0 100644 --- a/tests/bug-1924-preserve-user-artifacts.test.cjs +++ b/tests/bug-1924-preserve-user-artifacts.test.cjs @@ -57,7 +57,9 @@ function cleanup(dir) { function runInstaller(configDir) { const env = { ...process.env, CLAUDE_CONFIG_DIR: configDir }; delete env.GSD_TEST_MODE; - execFileSync(process.execPath, [INSTALL_SCRIPT, '--claude', '--global', '--yes'], { + // --no-sdk: this test covers user-artifact preservation only; skip SDK + // build (covered by install-smoke.yml) to keep the test deterministic. + execFileSync(process.execPath, [INSTALL_SCRIPT, '--claude', '--global', '--yes', '--no-sdk'], { encoding: 'utf-8', stdio: 'pipe', env, diff --git a/tests/bug-2136-sh-hook-version.test.cjs b/tests/bug-2136-sh-hook-version.test.cjs index 8d5b8f219..a9c6daaa8 100644 --- a/tests/bug-2136-sh-hook-version.test.cjs +++ b/tests/bug-2136-sh-hook-version.test.cjs @@ -68,7 +68,9 @@ function cleanup(dir) { } function runInstaller(configDir) { - execFileSync(process.execPath, [INSTALL_SCRIPT, '--claude', '--global', '--yes'], { + // --no-sdk: this test covers .sh hook version stamping only; skip SDK + // build (covered by install-smoke.yml). + execFileSync(process.execPath, [INSTALL_SCRIPT, '--claude', '--global', '--yes', '--no-sdk'], { encoding: 'utf-8', stdio: 'pipe', env: { ...process.env, CLAUDE_CONFIG_DIR: configDir },