From 293f6adb527f9cb48a808408566d48d0cf43b7ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Mon, 23 Mar 2026 10:59:25 -0600 Subject: [PATCH] Fix e2e test suite compatibility with heartwood 1.7.1 - Trim trailing newline from heartwood-release file read to prevent invalid binary paths - Replace repeated --label flags with a single --labels flag (new CLI) - Add --accept verdict to rad patch review calls that lacked one (now required by the CLI) --- tests/support/cobs/issue.ts | 2 +- tests/support/fixtures.ts | 3 ++- tests/support/heartwood-release | 2 +- tests/support/support.ts | 7 +++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/support/cobs/issue.ts b/tests/support/cobs/issue.ts index 956166586..eb52e65a9 100644 --- a/tests/support/cobs/issue.ts +++ b/tests/support/cobs/issue.ts @@ -15,7 +15,7 @@ export async function create( title, "--description", description, - ...labels.map(label => ["--label", label]).flat(), + ...(labels.length > 0 ? ["--labels", labels.join(",")] : []), ]; const { stdout } = await peer.rad(issueOptions, options); const match = stdout.match(/Issue {3}([a-zA-Z0-9]*)/); diff --git a/tests/support/fixtures.ts b/tests/support/fixtures.ts index 0308fdf6d..0edd87cba 100644 --- a/tests/support/fixtures.ts +++ b/tests/support/fixtures.ts @@ -387,7 +387,7 @@ export async function createCobsFixture( createOptions(repoFolder, 1), ); await eve.rad( - ["patch", "review", patchThree, "-m", "This looks better"], + ["patch", "review", patchThree, "-m", "This looks better", "--accept"], createOptions(repoFolder, 2), ); await Fs.appendFile( @@ -435,6 +435,7 @@ export async function createCobsFixture( patchFour, "-m", "No review due to patch being archived.", + "--accept", ], createOptions(repoFolder, 1), ); diff --git a/tests/support/heartwood-release b/tests/support/heartwood-release index 1cc5f657e..943f9cbc4 100644 --- a/tests/support/heartwood-release +++ b/tests/support/heartwood-release @@ -1 +1 @@ -1.1.0 \ No newline at end of file +1.7.1 diff --git a/tests/support/support.ts b/tests/support/support.ts index 53773d13e..80d45c76a 100644 --- a/tests/support/support.ts +++ b/tests/support/support.ts @@ -26,10 +26,9 @@ export const tmpDir = Path.resolve(supportDir, "..", "./tmp"); export const fixturesDir = Path.resolve(supportDir, "..", "./fixtures"); const workspacePaths = [Path.join(tmpDir, "peers"), Path.join(tmpDir, "repos")]; -export const heartwoodRelease = await Fs.readFile( - `${supportDir}/heartwood-release`, - "utf8", -); +export const heartwoodRelease = ( + await Fs.readFile(`${supportDir}/heartwood-release`, "utf8") +).trim(); // Assert that binaries are installed and are the correct version. export async function assertBinariesInstalled(