test(database): align with vault insecure-fallback opt-in convention
Aligns tests/unit/database.test.ts with the existing convention in
oauth-login-service/credential-resolver/credential-store tests: set
AGENTCOMPANY_ALLOW_INSECURE_VAULT=true in beforeAll so the in-memory
database test can call saveSecret without a real OS keychain.
Follow-up to aa1afd0 which removed the NODE_ENV=test/VITEST auto-enable.
This commit is contained in:
1 parent
deb980448c
commit
61caeb5f37
1 file changed
+5
-1
@@ -1,7 +1,11 @@
|
|||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { tmpdir } from "node:os";
|
import { tmpdir } from "node:os";
|
||||||
import { mkdtemp, rm } from "node:fs/promises";
|
import { mkdtemp, rm } from "node:fs/promises";
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
process.env.AGENTCOMPANY_ALLOW_INSECURE_VAULT = "true";
|
||||||
|
});
|
||||||
|
|
||||||
vi.mock("electron", () => ({
|
vi.mock("electron", () => ({
|
||||||
safeStorage: {
|
safeStorage: {
|
||||||
|
|||||||
Reference in new issue
Block a user