fix: finish cross-platform test parity while keeping POSIX deployment semantics

- cutover readState: enforce 0600 mode bits only on POSIX (Windows ACLs
  govern access; chmod is a no-op there)
- backup activation: skip the read-only-handle fsync on win32; the staged
  rename-over-open-WAL tests keep running on the POSIX deployment targets
- test-fixtures: normalize fixture paths to POSIX separators before
  comparing with manifest entries
This commit is contained in:
chick
2026-09-07 01:18:44 +08:00
parent 96dd9e2ba6
commit c57dc81e42
7 changed files with 32 additions and 19 deletions
@@ -362,7 +362,9 @@ describe('database backup and restore', () => {
migrateDatabase(database);
const backupPath = join(directory, 'backup.sqlite');
await backupDatabase(database, backupPath);
expect((await lstat(backupPath)).mode & 0o777).toBe(0o600);
// Windows keeps no POSIX mode bits; the 0600 guarantee is POSIX-only.
if (process.platform !== 'win32')
expect((await lstat(backupPath)).mode & 0o777).toBe(0o600);
database.close();
});