Skip to content

Commit 1c3ff34

Browse files
committed
ci(release): stabilize beta validation assertions
1 parent 59defa3 commit 1c3ff34

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/infra/npm-install-env.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ function expectZeroNpmJsonConfig(value: unknown): void {
3737
expect(value === 0 || value === "0").toBe(true);
3838
}
3939

40+
function expectUnsetOrZeroNpmJsonConfig(value: unknown): void {
41+
expect(value == null || value === false || value === 0 || value === "0").toBe(true);
42+
}
43+
4044
describe("npm project install env", () => {
4145
it("uses an absolute POSIX script shell for npm lifecycle scripts", () => {
4246
withMockedPlatform("linux", () => {
@@ -376,7 +380,7 @@ describe("npm project install env", () => {
376380
npmConfig.before === false ||
377381
typeof npmConfig.before === "string",
378382
).toBe(true);
379-
expectZeroNpmJsonConfig(npmConfig["min-release-age"]);
383+
expectUnsetOrZeroNpmJsonConfig(npmConfig["min-release-age"]);
380384
} finally {
381385
fsSync.rmSync(dir, { recursive: true, force: true });
382386
}

test/scripts/test-install-sh-docker.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,15 @@ describe("test-install-sh-docker", () => {
9898
it("allows repository branch history and release tags for secret-backed Docker release checks", () => {
9999
const workflow = readFileSync(LIVE_E2E_WORKFLOW_PATH, "utf8");
100100

101-
expect(workflow).toContain("git fetch --no-tags origin '+refs/heads/*:refs/remotes/origin/*'");
102101
expect(workflow).toContain('git rev-parse --verify "${INPUT_REF}^{commit}"');
102+
expect(workflow).toContain(
103+
'git merge-base --is-ancestor "$selected_sha" refs/remotes/origin/main',
104+
);
103105
expect(workflow).toContain("repository-branch-history");
104106
expect(workflow).toContain("git tag --points-at \"$selected_sha\" | grep -Eq '^v'");
107+
expect(workflow).toContain(
108+
"git for-each-ref --format='%(refname:short)' --contains \"$selected_sha\" refs/remotes/origin",
109+
);
105110
expect(workflow).toContain("reachable from an OpenClaw branch or release tag");
106111
});
107112

0 commit comments

Comments
 (0)