test: remove 2 verbatim duplicate test cases and rename env-gated SCP real tests to *.live.test.cjs (#4386)

This commit is contained in:
陈大猫 authored and GitHub committed 2026-11-25 21:40:20 +08:00
1 parent e99ab5a8eb
commit b8d05b3074
4 files changed
+1 -46

No files matched your search

@@ -10,7 +10,6 @@ import {
handleTerminalDropEntries,
resolveTerminalDropErrorMessage,
} from "./hooks/useTerminalDragDrop";
import { resolvePreferredTerminalCwd } from "./sftpCwd";
import { resolvePasswordAuthSftpHost } from "../../domain/authIdentityPicker";
const host = {
@@ -725,20 +724,3 @@ test("remote SSH folder drop refuses to guess a destination when the active shel
});
assert.equal(openedSftp, false);
});
test("fresh cwd resolution falls back to the renderer cwd when backend probe has no real cwd", async () => {
const cwd = await resolvePreferredTerminalCwd({
rendererCwd: "/srv/app/current",
sessionId: "session-1",
preferFreshBackend: true,
getSessionPwd: async (_sessionId, options) => {
assert.deepEqual(options, {
allowHomeFallback: false,
allowLoginShellFallback: true,
});
return { success: false, error: "Could not determine cwd" };
},
});
assert.equal(cwd, "/srv/app/current");
});
@@ -2,7 +2,7 @@
* Real-host integration through fileOps entry points (list/mkdir/write/rename/delete)
* used by UI IPC — same scpBackend under the hood, different ship surface.
*
* Env: NETCATTY_SCP_IT_HOST / USER / PASSWORD (same as scpIntegration.real.test.cjs)
* Env: NETCATTY_SCP_IT_HOST / USER / PASSWORD (same as scpIntegration.live.test.cjs)
*/
"use strict";
@@ -153,11 +153,4 @@ suite("real SCP via fileOps IPC surface", () => {
assert.ok(!afterDel.includes("b.txt"));
console.log("[scp-fileops-it] ops ok", { names, afterDel });
});
});
if (!ENABLED) {
describe("real SCP fileOps (skipped)", () => {
it("needs NETCATTY_SCP_IT_* env", () => { assert.ok(true); });
});
}
@@ -236,15 +236,3 @@ suite("real OpenSSH SCP integration (shipped scpBackend)", () => {
assert.equal(link.linkTarget, "directory");
});
});
// Always-visible marker so logs show skip reason when env unset
if (!ENABLED) {
describe("real OpenSSH SCP integration (skipped — set NETCATTY_SCP_IT_HOST/PASSWORD)", () => {
it("documents skip condition", () => {
console.log(
"[scp-it] skipped: export NETCATTY_SCP_IT_HOST NETCATTY_SCP_IT_USER NETCATTY_SCP_IT_PASSWORD (or NETCATTY_SCP_IT=1 with those set)",
);
assert.ok(true);
});
});
}
-8
View File
@@ -326,14 +326,6 @@ test("rpm packaging uses gzip compression for RHEL-family package hosts", () =>
);
});
test("Windows package arch is controlled by pack script CLI flags", () => {
assert.deepEqual(
config.win.target,
["nsis", "portable", "zip"],
"win.target must not hard-code x64 and arm64 or pack:win-x64 will still emit broken arm64 installers",
);
});
test("windows packaging includes a zip archive target", () => {
assert.ok(
config.win.target.includes("zip"),