fix: correct scoped k3s download examples

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
Codex
2026-07-11 05:39:20 +02:00
parent 11f8340098
commit ecef028132
2 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -311,9 +311,9 @@ function sshDownloadHelp(): unknown {
},
examples: {
host: "trans D601:/tmp download /tmp/trace.json ./trace.json",
k3sWorkload: "trans NC01:k3s:hwlab-v03:deployment:hwlab-cloud-api download /tmp/trace.json ./trace.json",
k3sWorkload: "trans NC01:k3s:hwlab-v03:hwlab-cloud-api:hwlab-cloud-api download /tmp/trace.json ./trace.json",
windowsDrive: "trans D601:win download 'D:\\tmp\\trace.json' ./trace.json",
explicitWorktree: `UNIDESK_TRANS_REPO_ROOT=${repoRoot} trans NC01:k3s:hwlab-v03:deployment:hwlab-cloud-api download /tmp/trace.json ./trace.json`,
explicitWorktree: `UNIDESK_TRANS_REPO_ROOT=${repoRoot} trans NC01:k3s:hwlab-v03:hwlab-cloud-api:hwlab-cloud-api download /tmp/trace.json ./trace.json`,
},
notes: [
"A k3s download requires a workload route; the control-plane-only <provider>:k3s route cannot name a remote file inside a workload.",
+6 -1
View File
@@ -36,8 +36,13 @@ describe("ssh download scoped help", () => {
expect(scoped.contract.transport).toBe("host.ssh.tcp-pool");
expect(scoped.contract.verification.automatic).toBe(true);
expect(scoped.examples.host).toContain("download /tmp/trace.json ./trace.json");
expect(scoped.examples.k3sWorkload).toContain(":k3s:");
expect(scoped.examples.k3sWorkload).toBe(
"trans NC01:k3s:hwlab-v03:hwlab-cloud-api:hwlab-cloud-api download /tmp/trace.json ./trace.json",
);
expect(scoped.examples.windowsDrive).toContain("D:\\tmp\\trace.json");
expect(scoped.examples.explicitWorktree).toBe(
`UNIDESK_TRANS_REPO_ROOT=${repoRoot} trans NC01:k3s:hwlab-v03:hwlab-cloud-api:hwlab-cloud-api download /tmp/trace.json ./trace.json`,
);
});
test("renders the original trans command without stdout dump fallback", () => {