mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-19 22:54:36 +01:00
test: free tests never write the real HOME (home-write tripwire), no orphaned browse daemons, symlinked-TMPDIR (macOS) fixes, gbrain-on-PATH isolation (#2895, #2816, #2829, #2841, #2982, #2911, #2909, #2908, #2910)
This commit is contained in:
1 parent
aefcb1bd4e
commit
615c0dcaa6
38 files changed
+447
-65
No files matched your search
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { describe, it, expect, beforeEach, afterEach } from "bun:test";
|
||||
import { mkdtempSync, writeFileSync, readFileSync, existsSync, rmSync, mkdirSync, statSync, chmodSync, readdirSync, symlinkSync, utimesSync, copyFileSync } from "fs";
|
||||
import { mkdtempSync, writeFileSync, readFileSync, existsSync, rmSync, mkdirSync, statSync, chmodSync, readdirSync, symlinkSync, utimesSync, copyFileSync, realpathSync } from "fs";
|
||||
import { tmpdir } from "os";
|
||||
import { basename, dirname, join } from "path";
|
||||
import { spawnSync } from "child_process";
|
||||
@@ -30,7 +30,7 @@ describe("requested secret scanning at the import boundary", () => {
|
||||
const realScanner = process.env.GSTACK_TEST_GITLEAKS;
|
||||
|
||||
beforeEach(() => {
|
||||
home = mkdtempSync(join(tmpdir(), "gstack-scan-"));
|
||||
home = realpathSync(mkdtempSync(join(tmpdir(), "gstack-scan-")));
|
||||
bin = join(home, "bin");
|
||||
mkdirSync(bin);
|
||||
mkdirSync(join(home, "tmp"));
|
||||
|
||||
Reference in new issue
Block a user