diff --git a/test/gstack-capy-install.test.ts b/test/gstack-capy-install.test.ts index 491b1ae20..85082d723 100644 --- a/test/gstack-capy-install.test.ts +++ b/test/gstack-capy-install.test.ts @@ -156,6 +156,17 @@ describe('gstack-capy-install', () => { expect(run(f, ['--revision']).status).toBe(2); }); + // Value: protects=--project names the project the verdict and launch file are keyed to; + // fails_when=a repo slug (owner/name) that is no directory silently keys the verdict to no project, so a later check reads a stale one; + // why_new=GST-743, HARN-12 lost three pregate runs to it; seam=bin/gstack-capy-install --project; no_claim=resolving slugs + test('--project that is not a directory (a repo slug) is a usage error: exit 2, no setup, no verdict', () => { + const f = fixture(); + const r = run(f, ['--for', 'ship', '--project', 'garrytan/harness-evals']); + expect([r.status, r.stderr.trim()]).toEqual([2, "gstack-capy-install: --project takes a directory path; 'garrytan/harness-evals' is not a directory (pass the project checkout's path, not a repo slug)"]); + expect(f.calls().filter(l => l.startsWith('setup') || l.startsWith('doctor '))).toEqual([]); + expect(fs.existsSync(path.join(f.home, '.gstack-state/install-verdicts'))).toBe(false); + }); + test('preflight: a missing tool stops with exit 3 and INSTALL_PREFLIGHT_FAILED before ./setup runs', () => { const f = fixture({ jq: false }); const r = run(f);