From d6de62a391e3d16db4867d068332375d31254df1 Mon Sep 17 00:00:00 2001 From: Danish Arora <35004822+danisharora099@users.noreply.github.com> Date: Mon, 12 Dec 2022 11:08:08 +0530 Subject: [PATCH] chore: remove relay as default when starting nwaku for tests (#1044) * chore: redeploy * remove: relay as default for nwaku * address: comments * remove relay as default and add where needed * Update packages/tests/tests/light_push.node.spec.ts Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> --- packages/tests/src/nwaku.ts | 2 +- packages/tests/tests/ephemeral.node.spec.ts | 7 ++++++- packages/tests/tests/filter.node.spec.ts | 2 +- packages/tests/tests/light_push.node.spec.ts | 8 ++++++-- packages/tests/tests/nwaku.node.spec.ts | 2 +- packages/tests/tests/store.node.spec.ts | 3 ++- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/tests/src/nwaku.ts b/packages/tests/src/nwaku.ts index a819407469..d4f21f8ecf 100644 --- a/packages/tests/src/nwaku.ts +++ b/packages/tests/src/nwaku.ts @@ -445,8 +445,8 @@ export function defaultArgs(): Args { return { listenAddress: "127.0.0.1", nat: "none", - relay: true, rpc: true, + relay: false, rpcAdmin: true, websocketSupport: true, logLevel: LogLevel.Trace, diff --git a/packages/tests/tests/ephemeral.node.spec.ts b/packages/tests/tests/ephemeral.node.spec.ts index 6a52f0a24f..2a7a7ee94e 100644 --- a/packages/tests/tests/ephemeral.node.spec.ts +++ b/packages/tests/tests/ephemeral.node.spec.ts @@ -48,7 +48,12 @@ describe("Waku Message Ephemeral field", () => { beforeEach(async function () { this.timeout(15_000); nwaku = new Nwaku(makeLogFileName(this)); - await nwaku.start({ filter: true, lightpush: true, store: true }); + await nwaku.start({ + filter: true, + lightpush: true, + store: true, + relay: true, + }); waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, libp2p: { addresses: { listen: ["/ip4/0.0.0.0/tcp/0/ws"] } }, diff --git a/packages/tests/tests/filter.node.spec.ts b/packages/tests/tests/filter.node.spec.ts index 0b97563264..df2b9eb597 100644 --- a/packages/tests/tests/filter.node.spec.ts +++ b/packages/tests/tests/filter.node.spec.ts @@ -26,7 +26,7 @@ describe("Waku Filter", () => { beforeEach(async function () { this.timeout(15000); nwaku = new Nwaku(makeLogFileName(this)); - await nwaku.start({ filter: true, lightpush: true }); + await nwaku.start({ filter: true, lightpush: true, relay: true }); waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, libp2p: { addresses: { listen: ["/ip4/0.0.0.0/tcp/0/ws"] } }, diff --git a/packages/tests/tests/light_push.node.spec.ts b/packages/tests/tests/light_push.node.spec.ts index 2a4f11c81a..fd530ce043 100644 --- a/packages/tests/tests/light_push.node.spec.ts +++ b/packages/tests/tests/light_push.node.spec.ts @@ -32,7 +32,7 @@ describe("Waku Light Push [node only]", () => { this.timeout(15_000); nwaku = new Nwaku(makeLogFileName(this)); - await nwaku.start({ lightpush: true }); + await nwaku.start({ lightpush: true, relay: true }); waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, @@ -65,7 +65,11 @@ describe("Waku Light Push [node only]", () => { const customPubSubTopic = "/waku/2/custom-dapp/proto"; nwaku = new Nwaku(makeLogFileName(this)); - await nwaku.start({ lightpush: true, topics: customPubSubTopic }); + await nwaku.start({ + lightpush: true, + topics: customPubSubTopic, + relay: true, + }); waku = await createLightNode({ pubSubTopic: customPubSubTopic, diff --git a/packages/tests/tests/nwaku.node.spec.ts b/packages/tests/tests/nwaku.node.spec.ts index 5423b584f0..2e33abf155 100644 --- a/packages/tests/tests/nwaku.node.spec.ts +++ b/packages/tests/tests/nwaku.node.spec.ts @@ -12,8 +12,8 @@ describe("nwaku", () => { const expected = [ "--listen-address=127.0.0.1", "--nat=none", - "--relay=true", "--rpc=true", + "--relay=false", "--rpc-admin=true", "--websocket-support=true", "--log-level=TRACE", diff --git a/packages/tests/tests/store.node.spec.ts b/packages/tests/tests/store.node.spec.ts index 5a3ef35735..c7645de550 100644 --- a/packages/tests/tests/store.node.spec.ts +++ b/packages/tests/tests/store.node.spec.ts @@ -44,7 +44,7 @@ describe("Waku Store", () => { beforeEach(async function () { this.timeout(15_000); nwaku = new Nwaku(makeLogFileName(this)); - await nwaku.start({ store: true, lightpush: true }); + await nwaku.start({ store: true, lightpush: true, relay: true }); }); afterEach(async function () { @@ -568,6 +568,7 @@ describe("Waku Store, custom pubsub topic", () => { await nwaku.start({ store: true, topics: customPubSubTopic, + relay: true, }); });