Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"@oclif/plugin-help": "6.2.36",
"@oclif/plugin-not-found": "3.2.73",
"@oclif/table": "0.5.1",
"@pkcprotocol/pkc-js": "0.0.82",
"@pkcprotocol/pkc-js": "0.0.83",
"dataobject-parser": "1.2.22",
"decompress": "4.2.1",
"env-paths": "2.2.1",
Expand Down
10 changes: 7 additions & 3 deletions test/cli/daemon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,13 @@ describe(`bitsocial daemon KUBO_RPC_URL env var`, async () => {
try {
const daemon = await startPkcDaemonWithDynamicPorts((e) => ["--pkcOptions.dataPath", randomDirectory(), "--pkcRpcUrl", e.rpcWsUrl]);
daemonProcess = daemon.daemonProcess;
// Kubo should be reachable on the port configured via the injected KUBO_RPC_URL env var
const res = await fetch(`${daemon.kuboApiUrl}/bitswap/stat`, { method: "POST" });
expect(res.status).toBe(200);
// Kubo should be reachable on the port configured via the injected KUBO_RPC_URL env var.
// Poll instead of a one-shot fetch: startPkcDaemon resolves on the "Communities in data
// path" banner, but pkc-js restarts kubo around init (it rewrites the Routing config and
// POSTs /shutdown on first connect), so a single fetch can land in the window where the
// API port refuses connections (issue #133, lineage #95).
const kuboReady = await waitForKuboReady(daemon.kuboApiUrl, 45000);
expect(kuboReady).toBe(true);
} finally {
await stopPkcDaemon(daemonProcess);
}
Expand Down