Skip to content
Source
Sign inSign up
pingdotgg/t3code

test(providers): OpenCode and ACP symlink tests are skipped where the host cannot create symlinks #18247

ClosedAdEx-Partners-DE(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/18247/headopened View on GitHub

Showing 2 changed files with 95 additions and 89 deletions.

x
0 of 2 viewed, 2 left
93 additions and 88 deletionspackages/provider-acp/src/server/clientPolicy.test.tsModified
View file
@@ -1,6 +1,7 @@
// @effect-diagnostics nodeBuiltinImport:off
import * as NodeServices from "@effect/platform-node/NodeServices";
import { assert, describe, it } from "@effect/vitest";
+import { symlinksSupported } from "@t3tools/shared/testing/symlinks";
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
import * as Path from "effect/Path";
@@ -123,100 +124,104 @@
});
​
- it.effect("denies mutations through workspace symlinks that escape the writable roots", () =>
- Effect.gen(function* () {
- const fileSystem = yield* FileSystem.FileSystem;
- const path = yield* Path.Path;
- const workspace = yield* fileSystem.makeTempDirectoryScoped({
- prefix: "t3-acp-permission-workspace-",
- });
- const outside = yield* fileSystem.makeTempDirectoryScoped({
- prefix: "t3-acp-permission-outside-",
- });
- const outsideFile = path.join(outside, "existing.ts");
- yield* fileSystem.writeFileString(outsideFile, "outside");
- yield* fileSystem.symlink(outsideFile, path.join(workspace, "linked-file.ts"));
- yield* fileSystem.symlink(outside, path.join(workspace, "linked-directory"));
+ it.effect.skipIf(!symlinksSupported)(
+ "denies mutations through workspace symlinks that escape the writable roots",
+ () =>
+ Effect.gen(function* () {