Skip to content

Commit

Permalink
create a new node to test setting http router config against
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinse12 committed Nov 2, 2024
1 parent e60c76d commit 5f71186
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/node-and-browser/plebbit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe("Plebbit options", async () => {
});

it(`Plebbit({ipfsHttpClientOptions, httpRoutersOptions}) will change config of ipfs node`, async () => {
const onlineIpfsNode = "http://localhost:5001/api/v0";
const onlineIpfsNode = "http://localhost:15006/api/v0";
// default list of http routers to use
const httpRouterUrls = ["https://routing.lol", "https://peers.pleb.bot"];

Expand Down
9 changes: 8 additions & 1 deletion test/server/test-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,15 @@ const anotherPubsubNodeArgs = {
extraCommands: ["bootstrap rm --all"]
};

const httpRouterNodeArgs = {
dir: path.join(process.cwd(), ".test-ipfs-http-router"),
apiPort: 15006,
gatewayPort: 18085,
extraCommands: ["bootstrap rm --all", "--offline"]
};

const startIpfsNodes = async () => {
const ipfsNodesToRun = [offlineNodeArgs, pubsubNodeArgs, anotherOfflineNodeArgs, anotherPubsubNodeArgs];
const ipfsNodesToRun = [offlineNodeArgs, pubsubNodeArgs, anotherOfflineNodeArgs, anotherPubsubNodeArgs, httpRouterNodeArgs];
if (startOnlineSub) ipfsNodesToRun.push(onlineNodeArgs);
for (const nodeArgs of ipfsNodesToRun) {
console.log("Initializing Node", nodeArgs.dir, "\n");
Expand Down

0 comments on commit 5f71186

Please sign in to comment.