This commit is contained in:
commit
23964f7695
24 files changed
+1126
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { spawnSync } from "node:child_process";
|
||||
import { test } from "node:test";
|
||||
|
||||
for (const environment of [
|
||||
{ VERSION: "1.2.3", RELEASE_COMMIT: "a".repeat(40) },
|
||||
{
|
||||
VERSION: "../../outside",
|
||||
RELEASE_CREDENTIAL: "synthetic-cli-fixture",
|
||||
RELEASE_COMMIT: "a".repeat(40),
|
||||
},
|
||||
]) {
|
||||
test(`CLI fails closed without echoing environment: ${Object.keys(environment)}`, () => {
|
||||
const child = spawnSync(process.execPath, ["build/release-tools/publish-release.js"], {
|
||||
encoding: "utf8", env: environment,
|
||||
});
|
||||
assert.equal(child.status, 1);
|
||||
assert.equal(child.stdout, "");
|
||||
assert.equal(child.stderr,
|
||||
"Release publication failed; inspect the release state before retrying.\n");
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user