Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Run tests against latest radicle 1.6.1 and httpd 0.24.0
Rūdolfs Ošiņš committed 2 months ago
commit 06aaa6a97c67e145477bd91126e59a3ff9fb5165
parent bd3b660
6 files changed +21 -38
modified tests/support/cobs/issue.ts
@@ -15,7 +15,7 @@ export async function create(
    title,
    "--description",
    description,
-
    ...labels.map(label => ["--label", label]).flat(),
+
    ...labels.map(label => ["--labels", label]).flat(),
  ];
  const { stdout } = await peer.rad(issueOptions, options);
  const match = stdout.match(/Issue {3}([a-zA-Z0-9]*)/);
modified tests/support/fixtures.ts
@@ -443,7 +443,7 @@ export async function createCobsFixture(
    createOptions(repoFolder, 5),
  );
  await peer.rad(
-
    ["patch", "review", patchOne, "-m", "LGTM", "--accept"],
+
    ["patch", "review", patchOne, "--accept"],
    createOptions(repoFolder, 6),
  );
  await patch.merge(
@@ -462,14 +462,7 @@ export async function createCobsFixture(
    { cwd: repoFolder },
  );
  await peer.rad(
-
    [
-
      "patch",
-
      "review",
-
      patchTwo,
-
      "-m",
-
      "Not the README we are looking for",
-
      "--reject",
-
    ],
+
    ["patch", "review", patchTwo, "--reject"],
    createOptions(repoFolder, 1),
  );

@@ -494,7 +487,7 @@ export async function createCobsFixture(
    createOptions(repoFolder, 1),
  );
  await eve.rad(
-
    ["patch", "review", patchThree, "-m", "This looks better"],
+
    ["patch", "review", patchThree, "--accept"],
    createOptions(repoFolder, 2),
  );
  await Fs.appendFile(
@@ -516,14 +509,7 @@ export async function createCobsFixture(
    createOptions(repoFolder, 3),
  );
  await peer.rad(
-
    [
-
      "patch",
-
      "review",
-
      patchThree,
-
      "-m",
-
      "No this doesn't look better",
-
      "--reject",
-
    ],
+
    ["patch", "review", patchThree, "--reject"],
    createOptions(repoFolder, 2),
  );

@@ -536,13 +522,7 @@ export async function createCobsFixture(
    { cwd: repoFolder },
  );
  await peer.rad(
-
    [
-
      "patch",
-
      "review",
-
      patchFour,
-
      "-m",
-
      "No review due to patch being archived.",
-
    ],
+
    ["patch", "review", patchFour, "--accept"],
    createOptions(repoFolder, 1),
  );
  await peer.rad(["patch", "archive", patchFour], createOptions(repoFolder, 2));
modified tests/support/globalSetup.ts
@@ -22,8 +22,13 @@ const heartwoodBinaryPath = Path.join(
  "bin",
  "heartwood",
  heartwoodRelease,
-
);
-
const httpdBinaryPath = Path.join(tmpDir, "bin", "httpd", radicleHttpdRelease);
+
).trim();
+
const httpdBinaryPath = Path.join(
+
  tmpDir,
+
  "bin",
+
  "httpd",
+
  radicleHttpdRelease,
+
).trim();

process.env.PATH = [
  heartwoodBinaryPath,
modified tests/support/heartwood-release
@@ -1 +1 @@
-
1.4.0

\ No newline at end of file
+
1.6.1
modified tests/support/radicle-httpd-release
@@ -1 +1 @@
-
0.20.0

\ No newline at end of file
+
0.24.0
modified tests/support/support.ts
@@ -25,15 +25,13 @@ 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();

-
export const radicleHttpdRelease = await Fs.readFile(
-
  `${supportDir}/radicle-httpd-release`,
-
  "utf8",
-
);
+
export const radicleHttpdRelease = (
+
  await Fs.readFile(`${supportDir}/radicle-httpd-release`, "utf8")
+
).trim();

// Assert that binaries are installed and are the correct version.
export async function assertBinariesInstalled(