TypeScript
test(server): the ACP registry's fake uv is a fixture file, not a generated string (#15484)
Yordis Prietof870c419fc21
diff --git a/apps/server/src/provider/acp/AcpRegistrySupport.test.ts b/apps/server/src/provider/acp/AcpRegistrySupport.test.tsindex a7cd5dc87ea..b12b13e3a4e 100644--- a/apps/server/src/provider/acp/AcpRegistrySupport.test.ts+++ b/apps/server/src/provider/acp/AcpRegistrySupport.test.ts@@ -116,33 +116,9 @@ const makeFakeUvToolchain = Effect.fn("AcpRegistrySupport.test.makeFakeUvToolchaconst logPath = path.join(rootDirectory, "uv.log");yield* fileSystem.makeDirectory(toolchainBin, { recursive: true });yield* fileSystem.writeFileString(logPath, "");- yield* fileSystem.writeFileString(+ yield* fileSystem.copyFile(+ yield* path.fromFileUrl(new URL("./testing/AcpRegistrySupport.uv.fixture.sh", import.meta.url)),uvPath,- [- "#!/bin/sh",- 'printf \'%s\\n\' "$*" >> "$FAKE_UV_LOG"',- 'tool_bin="${UV_TOOL_BIN_DIR:-$FAKE_UV_BIN}"',- 'executable="$tool_bin/fast-agent"',- 'printf "tool-dir=%s bin-dir=%s\\n" "$UV_TOOL_DIR" "$UV_TOOL_BIN_DIR" >> "$FAKE_UV_LOG"',- 'if [ "$1" = "tool" ] && [ "$2" = "dir" ] && [ "$3" = "--bin" ]; then',- " printf '%s\\n' \"$tool_bin\"",- " exit 0",- "fi",- 'if [ "$1" = "tool" ] && [ "$2" = "list" ]; then',- ' if [ -x "$executable" ]; then',- " printf 'fast-agent-acp v0.10.1\\n- fast-agent\\n'",- " fi",- " exit 0",- "fi",- 'if [ "$1" = "tool" ] && [ "$2" = "install" ] && [ "$3" = "--force" ]; then',- ' mkdir -p "$tool_bin"',- " printf '#!/bin/sh\\n' > \"$executable\"",- ' chmod 755 "$executable"',- " exit 0",- "fi",- "exit 64",- "",- ].join("\n"),);yield* fileSystem.chmod(uvPath, 0o755);return {diff --git a/apps/server/src/provider/acp/testing/AcpRegistrySupport.uv.fixture.sh b/apps/server/src/provider/acp/testing/AcpRegistrySupport.uv.fixture.shnew file mode 100755index 00000000000..18a456c24d1--- /dev/null+++ b/apps/server/src/provider/acp/testing/AcpRegistrySupport.uv.fixture.sh@@ -0,0 +1,22 @@+#!/bin/sh+printf '%s\n' "$*" >> "$FAKE_UV_LOG"+tool_bin="${UV_TOOL_BIN_DIR:-$FAKE_UV_BIN}"+executable="$tool_bin/fast-agent"+printf "tool-dir=%s bin-dir=%s\n" "$UV_TOOL_DIR" "$UV_TOOL_BIN_DIR" >> "$FAKE_UV_LOG"+if [ "$1" = "tool" ] && [ "$2" = "dir" ] && [ "$3" = "--bin" ]; then+ printf '%s\n' "$tool_bin"+ exit 0+fi+if [ "$1" = "tool" ] && [ "$2" = "list" ]; then+ if [ -x "$executable" ]; then+ printf 'fast-agent-acp v0.10.1\n- fast-agent\n'+ fi+ exit 0+fi+if [ "$1" = "tool" ] && [ "$2" = "install" ] && [ "$3" = "--force" ]; then+ mkdir -p "$tool_bin"+ printf '#!/bin/sh\n' > "$executable"+ chmod 755 "$executable"+ exit 0+fi+exit 64