Skip to content

Commit e28f015

Browse files
test(cli): username-proof the shareability fixture
sanitizeDiagnosticText replaces the current login name wherever it appears, so a fixture containing a plausible machine username flips sensitive on that box: 'test scripts' failed on the bench machine whose user is 'test'. Reuse the plugin twin's username-free fixture. Co-authored-by: Alfonso <alfonso-magic-context@users.noreply.github.com>
1 parent 78b70eb commit e28f015

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/cli/src/lib/redaction.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,13 @@ describe("hasShareabilitySensitiveText", () => {
171171
});
172172

173173
it("allows non-sensitive project facts", () => {
174-
expect(hasShareabilitySensitiveText("Use Bun for test scripts in this repo.")).toBe(false);
174+
// Fixture must avoid plausible machine usernames ("test", "runner",
175+
// "admin"): sanitize replaces the current login name anywhere it
176+
// appears, so a fixture containing it flips sensitive on that box
177+
// (bench machines log in as "test", CI as "runner").
178+
expect(
179+
hasShareabilitySensitiveText("Migration v45 adds the retrospective watermark column."),
180+
).toBe(false);
175181
});
176182
});
177183

0 commit comments

Comments
 (0)