Skip to content

Commit

Permalink
Fix radicle-httpd tests for radicle 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinez committed Dec 2, 2024
1 parent 497ce2c commit 07ee16c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion config/default.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"nodes": {
"fallbackPublicExplorer": "https://app.radicle.xyz/nodes/$host/$rid$path",
"apiVersion": "6.0.0",
"apiVersion": "6.2.0",
"defaultHttpdPort": 443,
"defaultHttpdScheme": "https"
},
Expand Down
2 changes: 1 addition & 1 deletion radicle-httpd/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN curl -sSf -o zig.tar.xz https://ziglang.org/download/0.12.0/zig-linu
xz -d -c zig.tar.xz | tar -x && \
mv zig-linux-x86_64-0.12.0/zig /usr/bin/zig && \
mv zig-linux-x86_64-0.12.0/lib /usr/lib/zig && \
cargo install [email protected]
cargo install [email protected] --locked


# Parts of the macOS SDK are required to build Radicle, we make these available
Expand Down
9 changes: 4 additions & 5 deletions radicle-httpd/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,17 @@ impl Context {

let payloads: BTreeMap<PayloadId, Value> = doc
.payload()
.clone()
.into_iter()
.iter()
.filter_map(|(id, payload)| {
if id == PayloadId::project() {
if id == &PayloadId::project() {
let (_, head) = repo.head().ok()?;
let patches = self.profile.patches(repo).ok()?;
let patches = patches.counts().ok()?;
let issues = self.profile.issues(repo).ok()?;
let issues = issues.counts().ok()?;

Some((
id,
id.clone(),
json!({
"data": payload,
"meta": {
Expand All @@ -87,7 +86,7 @@ impl Context {
}),
))
} else {
Some((id, json!({ "data": payload })))
Some((id.clone(), json!({ "data": payload })))
}
})
.collect();
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test("node metadata", async ({ page, peerManager }) => {
await page.goto(peer.uiUrl());

await expect(page.getByText(shortNodeRemote).first()).toBeVisible();
await expect(page.getByText("/radicle:1.0.0/")).toBeVisible();
await expect(page.getByText("/radicle:1.1.0-pre.4/")).toBeVisible();
});

test("node repos", async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/support/heartwood-release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.1.0-pre.4
2 changes: 1 addition & 1 deletion tests/support/radicle-httpd-release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.17.0
0.18.0-pre

0 comments on commit 07ee16c

Please sign in to comment.