fix: add shard arg to nwaku in peer management tests (#2005)

This commit is contained in:
Arseniy Klempner 2024-05-09 01:25:35 -07:00 committed by GitHub
parent 21aa22f320
commit 5df41b0adf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 7 deletions

View File

@ -26,7 +26,11 @@ async function main() {
// Run mocha tests
const mocha = spawn("npx", mochaArgs, {
stdio: "inherit"
stdio: "inherit",
env: {
...process.env,
NODE_ENV: "test"
}
});
mocha.on("error", (error) => {

View File

@ -25,6 +25,7 @@ export interface Args {
// `legacyFilter` is required to enable filter v1 with go-waku
legacyFilter?: boolean;
clusterId?: number;
shard?: Array<number>;
}
export interface Ports {

View File

@ -61,7 +61,8 @@ describe("Static Sharding: Peer Management", function () {
discv5Discovery: true,
peerExchange: true,
relay: true,
clusterId: clusterId
clusterId: clusterId,
shard: [2]
});
const enr1 = (await nwaku1.info()).enrUri;
@ -72,7 +73,8 @@ describe("Static Sharding: Peer Management", function () {
peerExchange: true,
discv5BootstrapNode: enr1,
relay: true,
clusterId: clusterId
clusterId: clusterId,
shard: [2]
});
const enr2 = (await nwaku2.info()).enrUri;
@ -83,7 +85,8 @@ describe("Static Sharding: Peer Management", function () {
peerExchange: true,
discv5BootstrapNode: enr2,
relay: true,
clusterId: clusterId
clusterId: clusterId,
shard: [2]
});
const nwaku3Ma = await nwaku3.getMultiaddrWithId();
@ -140,7 +143,8 @@ describe("Static Sharding: Peer Management", function () {
relay: true,
discv5Discovery: true,
peerExchange: true,
clusterId: clusterId
clusterId: clusterId,
shard: [1]
});
const enr1 = (await nwaku1.info()).enrUri;
@ -151,7 +155,8 @@ describe("Static Sharding: Peer Management", function () {
discv5Discovery: true,
peerExchange: true,
discv5BootstrapNode: enr1,
clusterId: clusterId
clusterId: clusterId,
shard: [2]
});
const enr2 = (await nwaku2.info()).enrUri;
@ -162,7 +167,8 @@ describe("Static Sharding: Peer Management", function () {
discv5Discovery: true,
peerExchange: true,
discv5BootstrapNode: enr2,
clusterId: clusterId
clusterId: clusterId,
shard: [2]
});
const nwaku3Ma = await nwaku3.getMultiaddrWithId();