mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-27 19:52:49 +00:00
test(server): keep POSIX mode assertions out of the cross-platform suite
Windows ignores mkdir/writeFile modes and reports 0o666, so the directory and file mode assertions failed on the windows-latest runner. The .posix suite already covers both and skips on win32.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { existsSync, mkdtempSync, readdirSync, rmSync, statSync, utimesSync } from "node:fs";
|
||||
import { existsSync, mkdtempSync, readdirSync, rmSync, utimesSync } from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, test } from "vitest";
|
||||
@@ -152,8 +152,8 @@ describe("materializeProviderImage", () => {
|
||||
// let the OS reap these images out from under the app after ~3 days.
|
||||
expect(path.dirname(result.path)).toBe(attachmentsDir());
|
||||
expect(path.basename(path.dirname(result.path))).toBe("paseo-attachments");
|
||||
expect(statSync(attachmentsDir()).mode & 0o777).toBe(0o700);
|
||||
expect(statSync(result.path).mode & 0o777).toBe(0o600);
|
||||
// Mode assertions live in the .posix suite: Windows ignores mkdir/writeFile
|
||||
// modes and reports 0o666, so asserting them here fails on that runner.
|
||||
});
|
||||
|
||||
test("is idempotent for the same bytes across daemon restarts", () => {
|
||||
|
||||
Reference in New Issue
Block a user