mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-18 02:42:25 +02:00
test: make the Darwin migration path and the query-timeout SKIP deterministic on Linux CI
The v1.65 migration suite relied on the host being macOS — on the ubicloud runner the script's uname gate early-exited every test with empty output; a Darwin uname shim in the shared setup runs the real path everywhere (the non-Darwin test still overrides it with Linux). The 1ms-budget brain-context test assumed 1ms is always too short; the runner's fake gbrain answered in 0ms and no SKIP printed — the fake now sleeps 300ms so the timeout is a certainty, while --version stays instant for the detection assertion.
This commit is contained in:
@@ -109,6 +109,13 @@ beforeEach(() => {
|
||||
pwCache = path.join(tmpHome, 'pw-cache', 'ms-playwright');
|
||||
fs.mkdirSync(pwCache, { recursive: true });
|
||||
fs.mkdirSync(path.join(tmpHome, '.gstack'), { recursive: true });
|
||||
// The migration gates on `uname -s` = Darwin; on the Linux CI runner the
|
||||
// real uname made every test early-exit with empty output. Shim Darwin so
|
||||
// the Darwin-path tests run everywhere; the non-Darwin test overwrites
|
||||
// this shim with its own Linux uname.
|
||||
fs.writeFileSync(path.join(fakeBinDir, 'uname'), '#!/bin/bash\necho Darwin\n', {
|
||||
mode: 0o755,
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user