Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Secret cards test: check the private file's mode only off Windows (#5095)

Milind Sonic5784f19c748
diff --git a/server/host/secret-cards.test.ts b/server/host/secret-cards.test.ts
index b5a790bd04..3a9e9a65bd 100644
--- a/server/host/secret-cards.test.ts
+++ b/server/host/secret-cards.test.ts
@@ -405,7 +405,7 @@ describe("a secret a linked 1Password holds", () => {
const file = /to the file (\S+)\. /u.exec(String(answer.body.text))?.[1];
expect(file?.startsWith(join(one.dataDir, ".openmausbot-secrets", "t1", "vault-linked-"))).toBe(true);
expect(readFileSync(file!, "utf8")).toBe(NOTION);
- expect(statSync(file!).mode & 0o777).toBe(0o600);
+ if (process.platform !== "win32") expect(statSync(file!).mode & 0o777).toBe(0o600);
});
it("is not for a bot its 1Password vault is kept from, which gets a card instead", async () => {