Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: respect Windows certificate file permission semantics (#9451)

[._.]/ Adam Eivy2cc143a34add
diff --git a/server/lib/pgTools.test.js b/server/lib/pgTools.test.js
index b49bb869ff..a36650e5b3 100644
--- a/server/lib/pgTools.test.js
+++ b/server/lib/pgTools.test.js
@@ -202,7 +202,8 @@ describe('managed PostgreSQL TLS roots', () => {
await expect(withPgToolEnv({ ssl: true }, async env => {
path = env.PGSSLROOTCERT;
expect(await readFile(path, 'utf8')).toContain('BEGIN CERTIFICATE');
- expect((await stat(path)).mode & 0o777).toBe(0o600);
+ // Windows does not expose POSIX permission bits.
+ if (process.platform !== 'win32') expect((await stat(path)).mode & 0o777).toBe(0o600);
throw new Error('example spawn failure');
})).rejects.toThrow('example spawn failure');
await expect(stat(path)).rejects.toMatchObject({ code: 'ENOENT' });