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.
This commit is contained in:
Jeremy McSpadden
2026-04-19 16:35:32 -05:00
parent f98ef1e460
commit 04fab926b5
3 changed files with 10 additions and 3 deletions

View File

@@ -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: {

View File

@@ -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,

View File

@@ -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 },