From 46ce00e46e9f7c73ff215f1668cfe0b48d49e3c6 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 25 Jul 2024 16:47:57 +1000 Subject: [PATCH] fix: failing tests making requests to real servers :bad: --- ts/test/test-utils/utils/pubkey.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/test/test-utils/utils/pubkey.ts b/ts/test/test-utils/utils/pubkey.ts index 3bbc381b6..6c8ba49e6 100644 --- a/ts/test/test-utils/utils/pubkey.ts +++ b/ts/test/test-utils/utils/pubkey.ts @@ -45,7 +45,8 @@ export function generateFakePubKeys(amount: number): Array { export function generateFakeSnode(): Snode { return { - ip: `${ipv4Section()}.${ipv4Section()}.${ipv4Section()}.${ipv4Section()}`, + // NOTE: make sure this is random, but not a valid ip (otherwise we will try to hit that ip during testing!) + ip: `${ipv4Section()}.${ipv4Section()}.${ipv4Section()}.${ipv4Section()}.${ipv4Section()}.${ipv4Section()}`, port: 22116, pubkey_x25519: generateFakePubKeyStr(), pubkey_ed25519: generateFakePubKeyStr(), @@ -59,7 +60,8 @@ function ipv4Section() { export function generateFakeSnodeWithEdKey(ed25519Pubkey: string): Snode { return { - ip: `${ipv4Section()}.${ipv4Section()}.${ipv4Section()}.${ipv4Section()}`, + // NOTE: make sure this is random, but not a valid ip (otherwise we will try to hit that ip during testing!) + ip: `${ipv4Section()}.${ipv4Section()}.${ipv4Section()}.${ipv4Section()}.${ipv4Section()}.${ipv4Section()}`, port: 22116, pubkey_x25519: generateFakePubKeyStr(), pubkey_ed25519: ed25519Pubkey,