mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-14 13:22:37 +00:00
test(server): make commit signing checks independent of global format (#6540)
The failing signer uses gpg.program, which Git bypasses when a global SSH signing format is inherited. Select OpenPGP in the commit and squash-merge test repositories so both checks exercise their configured failing signer. Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -523,6 +523,7 @@ describe("checkout git utilities", () => {
|
|||||||
|
|
||||||
it("honors commit signing configuration", async () => {
|
it("honors commit signing configuration", async () => {
|
||||||
execFileSync("git", ["config", "commit.gpgsign", "true"], { cwd: repoDir });
|
execFileSync("git", ["config", "commit.gpgsign", "true"], { cwd: repoDir });
|
||||||
|
execFileSync("git", ["config", "gpg.format", "openpgp"], { cwd: repoDir });
|
||||||
execFileSync("git", ["config", "gpg.program", process.execPath], { cwd: repoDir });
|
execFileSync("git", ["config", "gpg.program", process.execPath], { cwd: repoDir });
|
||||||
writeFileSync(join(repoDir, "file.txt"), "signed\n");
|
writeFileSync(join(repoDir, "file.txt"), "signed\n");
|
||||||
|
|
||||||
@@ -3578,6 +3579,7 @@ const x = 1;
|
|||||||
cwd: repoDir,
|
cwd: repoDir,
|
||||||
});
|
});
|
||||||
execFileSync("git", ["config", "commit.gpgsign", "true"], { cwd: repoDir });
|
execFileSync("git", ["config", "commit.gpgsign", "true"], { cwd: repoDir });
|
||||||
|
execFileSync("git", ["config", "gpg.format", "openpgp"], { cwd: repoDir });
|
||||||
execFileSync("git", ["config", "gpg.program", process.execPath], { cwd: repoDir });
|
execFileSync("git", ["config", "gpg.program", process.execPath], { cwd: repoDir });
|
||||||
|
|
||||||
await expect(mergeToBase(repoDir, { baseRef: "main", mode: "squash" })).rejects.toThrow(
|
await expect(mergeToBase(repoDir, { baseRef: "main", mode: "squash" })).rejects.toThrow(
|
||||||
|
|||||||
Reference in New Issue
Block a user