diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts index 18f76639fba..d720ec77c41 100644 --- a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts +++ b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts @@ -126,7 +126,7 @@ export class CarbonAccountingApp { } const addressInfo = httpApi.address() as AddressInfo; - const nodeApiHost = `http://localhost:${addressInfo.port}`; + const nodeApiHost = `http://127.0.0.1:${addressInfo.port}`; const config = new Configuration({ basePath: nodeApiHost }); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts index dfc71ded399..4ae10f035af 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts @@ -12,7 +12,7 @@ export async function lockBesuAssetReference( assetRefID: string, ): Promise { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "SEND", @@ -31,7 +31,7 @@ export async function lockBesuAssetReference( export async function getBesuBalance(address: string): Promise { const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_CBDC_ERC20_NAME, invocationType: "CALL", @@ -54,7 +54,7 @@ export async function isBesuAssetReference( assetRefID: string, ): Promise { const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "CALL", @@ -75,7 +75,7 @@ export async function isBesuAssetReference( export async function resetBesu(): Promise { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_CBDC_ERC20_NAME, invocationType: "SEND", @@ -98,7 +98,7 @@ export async function resetBesu(): Promise { ); await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "SEND", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts index 64b768f5d13..4188182bfcb 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts @@ -8,7 +8,7 @@ const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; export async function getFabricBalance(identity: string): Promise { const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -29,7 +29,7 @@ export async function readFabricAssetReference( assetRefID: string, ): Promise { const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -50,7 +50,7 @@ export async function fabricAssetReferenceExists( assetRefID: string, ): Promise { const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -72,7 +72,7 @@ export async function lockFabricAssetReference( assetRefID: string, ): Promise { return axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -92,7 +92,7 @@ export async function deleteFabricAssetReference( assetRefID: string, ): Promise { return axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -113,7 +113,7 @@ export async function refundFabricTokens( finalUserEthAddress: string, ): Promise { return axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -130,7 +130,7 @@ export async function refundFabricTokens( export async function resetFabric(): Promise { await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -145,7 +145,7 @@ export async function resetFabric(): Promise { ); await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts index 18d07446824..64f4270c156 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts @@ -27,7 +27,7 @@ Given( "{string} with {int} CBDC available in the sidechain smart contract", async function (user: string, amount: number) { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "SEND", @@ -49,7 +49,7 @@ When( "{string} escrows {int} CBDC and creates an asset reference with id {string} in the sidechain", async function (user: string, amount: number, assetRefID: string) { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_CBDC_ERC20_NAME, invocationType: "SEND", @@ -82,7 +82,7 @@ When( "bob deletes the asset reference with id {string} in the sidechain", async function (assetRefID: string) { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "SEND", @@ -125,7 +125,7 @@ Then( "the asset reference with id {string} is locked in the sidechain", async function (assetRefID: string) { const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "CALL", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts index f2466348d07..e4b253fd267 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts @@ -30,13 +30,13 @@ Then( }; const response = await axios.post( - "http://localhost:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", { clientGatewayConfiguration: { - apiHost: `http://localhost:4100`, + apiHost: `http://127.0.0.1:4100`, }, serverGatewayConfiguration: { - apiHost: `http://localhost:4000`, + apiHost: `http://127.0.0.1:4000`, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -92,13 +92,13 @@ Then( await axios .post( - "http://localhost:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", { clientGatewayConfiguration: { - apiHost: `http://localhost:4100`, + apiHost: `http://127.0.0.1:4100`, }, serverGatewayConfiguration: { - apiHost: `http://localhost:4000`, + apiHost: `http://127.0.0.1:4000`, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts index 393e5a7252d..3ed80385af1 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts @@ -14,7 +14,7 @@ Then( "the bridged out amount in the chaincode is {int} CBDC", async function (amount: string) { const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -55,13 +55,13 @@ When( }; const response = await axios.post( - "http://localhost:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", { clientGatewayConfiguration: { - apiHost: `http://localhost:4000`, + apiHost: `http://127.0.0.1:4000`, }, serverGatewayConfiguration: { - apiHost: `http://localhost:4100`, + apiHost: `http://127.0.0.1:4100`, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -118,13 +118,13 @@ Then( await axios .post( - "http://localhost:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", { clientGatewayConfiguration: { - apiHost: `http://localhost:4000`, + apiHost: `http://127.0.0.1:4000`, }, serverGatewayConfiguration: { - apiHost: `http://localhost:4100`, + apiHost: `http://127.0.0.1:4100`, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts index 9fe3afd5db4..c69af0e57b8 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts @@ -29,7 +29,7 @@ Given( "{string} with {int} CBDC available in the source chain", async function (user: string, amount: number) { await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -51,7 +51,7 @@ When( "{string} escrows {int} CBDC and creates an asset reference with id {string} in the source chain", async function (user: string, amount: number, assetRefID: string) { await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -98,7 +98,7 @@ Then( async function (user: string, assetRefID: string) { return axios .post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -126,7 +126,7 @@ Then( axios .post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, diff --git a/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts b/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts index 5b98669647e..363e17d810f 100644 --- a/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts +++ b/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts @@ -224,13 +224,13 @@ export class SupplyChainApp { const httpGuiC = await Servers.startOnPort(3200, "0.0.0.0"); const addressInfoA = httpApiA.address() as AddressInfo; - const nodeApiHostA = `http://localhost:${addressInfoA.port}`; + const nodeApiHostA = `http://127.0.0.1:${addressInfoA.port}`; const addressInfoB = httpApiB.address() as AddressInfo; - const nodeApiHostB = `http://localhost:${addressInfoB.port}`; + const nodeApiHostB = `http://127.0.0.1:${addressInfoB.port}`; const addressInfoC = httpApiC.address() as AddressInfo; - const nodeApiHostC = `http://localhost:${addressInfoC.port}`; + const nodeApiHostC = `http://127.0.0.1:${addressInfoC.port}`; const token = await this.getOrCreateToken(); const baseOptions = { headers: { Authorization: `Bearer ${token}` } }; @@ -464,7 +464,7 @@ export class SupplyChainApp { const memberIdA = uuidv4(); const nodeIdA = uuidv4(); const addressInfoA = serverA.address() as AddressInfo; - const nodeApiHostA = `http://localhost:${addressInfoA.port}`; + const nodeApiHostA = `http://127.0.0.1:${addressInfoA.port}`; const publickKeyPemA = await exportSPKI(keyPairA); const cactusNodeA: CactusNode = { @@ -492,7 +492,7 @@ export class SupplyChainApp { const memberIdB = uuidv4(); const nodeIdB = uuidv4(); const addressInfoB = serverB.address() as AddressInfo; - const nodeApiHostB = `http://localhost:${addressInfoB.port}`; + const nodeApiHostB = `http://127.0.0.1:${addressInfoB.port}`; const publickKeyPemB = await exportSPKI(keyPairB); const cactusNodeB: CactusNode = { @@ -521,7 +521,7 @@ export class SupplyChainApp { const memberIdC = uuidv4(); const nodeIdC = uuidv4(); const addressInfoC = serverC.address() as AddressInfo; - const nodeApiHostC = `http://localhost:${addressInfoC.port}`; + const nodeApiHostC = `http://127.0.0.1:${addressInfoC.port}`; const publickKeyPemC = await exportSPKI(keyPairC); const cactusNodeC: CactusNode = { diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts index f4d34f0c0cd..d57d6b7f155 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts @@ -143,7 +143,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts index 818f9a7bf7c..417c89b2089 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts @@ -142,7 +142,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: server, }; diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts index adc8e4b86ee..7343633d06d 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts @@ -147,7 +147,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts index c49cdc1b84c..db77265eece 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts @@ -149,7 +149,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts index 67a65ddaac4..01e8b561c28 100644 --- a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts +++ b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts @@ -42,7 +42,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts index 9203f376bbb..b67e82c8b13 100644 --- a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts +++ b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts @@ -61,7 +61,7 @@ test("PluginObjectStoreIpfs", async (t1: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts b/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts index 45c39b79fb9..cf9fc77e8bc 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts @@ -511,7 +511,7 @@ export class ConfigService { const cockpitPort = (schema.cockpitPort as SchemaObj).default; const pkiGenerator = new SelfSignedPkiGenerator(); - const pkiServer: IPki = pkiGenerator.create("localhost"); + const pkiServer: IPki = pkiGenerator.create("127.0.0.1"); const plugins: PluginImport[] = [ { diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts index f8a6a698564..f8178adfb64 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts @@ -58,7 +58,7 @@ test("NodeJS API server + Rust plugin work together", async (t: Test) => { t.comment(`CactusKeychainVaultServer (Port=${hostPort}) started OK`); const configuration = new Configuration({ - basePath: `http://localhost:${hostPort}`, + basePath: `http://127.0.0.1:${hostPort}`, }); const apiClient = new DefaultApi(configuration); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts index d1b77e9cb1b..9b0734def80 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts @@ -25,7 +25,7 @@ test("works with HTTPS NodeJS module", async (t: Test) => { const generator = new SelfSignedPkiGenerator(); t.ok(generator, "Instantiated SelfSignedCertificateGenerator OK."); - const serverCert: IPki = generator.create("localhost"); + const serverCert: IPki = generator.create("127.0.0.1"); t.ok(serverCert, "serverCert truthy"); t.ok(serverCert.certificatePem, "serverCert.certificatePem truthy"); t.ok(serverCert.privateKeyPem, "serverCert.privateKeyPem truthy"); @@ -33,7 +33,7 @@ test("works with HTTPS NodeJS module", async (t: Test) => { t.ok(serverCert.keyPair, "serverCert.keyPair truthy"); // make sure the client cert has a different common name otherwise they collide and everything breaks in this test - const clientCert: IPki = generator.create("client.localhost", serverCert); + const clientCert: IPki = generator.create("client.127.0.0.1", serverCert); t.ok(clientCert, "clientCert truthy"); t.ok(clientCert.certificatePem, "clientCert.certificatePem truthy"); t.ok(clientCert.privateKeyPem, "clientCert.privateKeyPem truthy"); @@ -81,7 +81,7 @@ test("works with HTTPS NodeJS module", async (t: Test) => { aServer.once("tlsClientError", (err: Error) => reject(err)); aServer.once("listening", () => resolve(aServer)); - aServer.listen(0, "localhost"); + aServer.listen(0, "127.0.0.1"); test.onFinish(() => aServer.close()); }); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts index 24eca432bc5..0e303f63529 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts @@ -17,7 +17,7 @@ tap.test("works with HTTPS NodeJS module", async (assert: any) => { const generator = new SelfSignedPkiGenerator(); assert.ok(generator, "Instantiated SelfSignedCertificateGenerator OK."); - const serverCertData: IPki = generator.create("localhost"); + const serverCertData: IPki = generator.create("127.0.0.1"); assert.ok(serverCertData, "Returned cert data truthy"); assert.ok(serverCertData.certificatePem, "certData.certificatePem truthy"); assert.ok(serverCertData.privateKeyPem, "certData.privateKeyPem truthy"); @@ -42,7 +42,7 @@ tap.test("works with HTTPS NodeJS module", async (assert: any) => { reject(err); }); aServer.once("listening", () => resolve(aServer)); - aServer.listen(0, "localhost"); + aServer.listen(0, "127.0.0.1"); assert.tearDown(() => aServer.close()); }); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts index f2848b926b2..24a94e473d8 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts @@ -141,14 +141,14 @@ describe("cmd-api-server:getOpenApiSpecV1Endpoint", () => { ); const res1Promise = new Promise((resolve, reject) => { - server.bindAsync("localhost:0", serverInsecureCreds, (err, port) => { + server.bindAsync("127.0.0.1:0", serverInsecureCreds, (err, port) => { if (err) { reject(err); } else { server.start(); const client = new grpc.Client( - `localhost:${port}`, + `127.0.0.1:${port}`, clientInsecureCreds, ); @@ -199,7 +199,7 @@ describe("cmd-api-server:getOpenApiSpecV1Endpoint", () => { ); const res1Promise = new Promise((resolve, reject) => { - server.bindAsync("localhost:0", serverInsecureCreds, (err, port) => { + server.bindAsync("127.0.0.1:0", serverInsecureCreds, (err, port) => { if (err) { reject(err); } else { @@ -207,7 +207,7 @@ describe("cmd-api-server:getOpenApiSpecV1Endpoint", () => { const client = new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - `localhost:${port}`, + `127.0.0.1:${port}`, clientInsecureCreds, ); client.makeUnaryRequest( @@ -257,10 +257,10 @@ describe("cmd-api-server:getOpenApiSpecV1Endpoint", () => { ); const res1Promise = new Promise((resolve, reject) => { - server.bindAsync("localhost:0", serverInsecureCreds, (err, port) => { + server.bindAsync("127.0.0.1:0", serverInsecureCreds, (err, port) => { const client = new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - `localhost:${port}`, + `127.0.0.1:${port}`, clientInsecureCreds, ); if (err) { diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts index 456d5554bfe..7e3a96da8d6 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts @@ -19,8 +19,8 @@ test(testCase, async (t: Test) => { const generator = new SelfSignedPkiGenerator(); t.ok(generator, "Instantiated SelfSignedCertificateGenerator OK."); - const serverCert = generator.create("localhost"); - const clientCert = generator.create("client.localhost", serverCert); + const serverCert = generator.create("127.0.0.1"); + const clientCert = generator.create("client.127.0.0.1", serverCert); const serverRootCertPemBuf = Buffer.from(serverCert.certificatePem); const configService = new ConfigService(); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts index edc526d55db..78e71ef5d18 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts @@ -62,7 +62,7 @@ test.skip("can import plugins at runtime (CLI)", async (t: Test) => { options: { instanceId: uuidv4(), logLevel, - rpcApiHttpHost: "localhost:8545", + rpcApiHttpHost: "127.0.0.1:8545", }, }, ]; diff --git a/packages/cactus-cmd-socketio-server/src/test/typescript/unit/validator-registry.test.ts b/packages/cactus-cmd-socketio-server/src/test/typescript/unit/validator-registry.test.ts index db14982be30..809483af187 100644 --- a/packages/cactus-cmd-socketio-server/src/test/typescript/unit/validator-registry.test.ts +++ b/packages/cactus-cmd-socketio-server/src/test/typescript/unit/validator-registry.test.ts @@ -25,7 +25,7 @@ test("ValidatorRegistry constructor parses required fields", () => { const mockLedgerPluginInfo = { validatorID: "abc123", validatorType: "socketio", - validatorURL: "https://localhost:1234", + validatorURL: "https://127.0.0.1:1234", validatorKeyPath: "./path/to/validator/key.crt", ledgerInfo: { ledgerAbstract: "Test ledger input", @@ -56,15 +56,15 @@ test("ValidatorRegistry constructor parses required fields", () => { peers: [ { name: "peer.test.com", - requests: "grpc://localhost/1234", + requests: "grpc://127.0.0.1/1234", }, ], orderer: { - URL: "grpc://localhost/1234", + URL: "grpc://127.0.0.1/1234", }, ca: { name: "myca.test.com", - URL: "http://localhost/1234", + URL: "http://127.0.0.1/1234", }, submitter: { name: "admin", diff --git a/packages/cactus-common/src/test/typescript/unit/servers.test.ts b/packages/cactus-common/src/test/typescript/unit/servers.test.ts index 07cfe3e990f..9147a8f4cfa 100644 --- a/packages/cactus-common/src/test/typescript/unit/servers.test.ts +++ b/packages/cactus-common/src/test/typescript/unit/servers.test.ts @@ -29,7 +29,7 @@ describe(testCase, () => { { await expect( Servers.listen({ - hostname: "localhost", + hostname: "127.0.0.1", port: false as unknown as number, server, }), @@ -38,12 +38,12 @@ describe(testCase, () => { { await expect( - Servers.listen({ hostname: "localhost", port: 0, server }), + Servers.listen({ hostname: "127.0.0.1", port: 0, server }), ).toResolve(); } const prefPort = 4123; - const host = "localhost"; + const host = "127.0.0.1"; const listenOptionsBlocker = { server: portBlocker, diff --git a/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts b/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts index ea558ed2eae..070daf304af 100644 --- a/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts +++ b/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts @@ -32,7 +32,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts index 484caf3a492..a7ce4c4028d 100644 --- a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -88,7 +88,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts index 39715cbfb07..edd4b43ddd5 100644 --- a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts +++ b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts @@ -85,7 +85,7 @@ test("get,set,has,delete alters state as expected", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts index f68aad980ea..0088f95045e 100644 --- a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -45,7 +45,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts index b42b58eb785..49a5f7b38a3 100644 --- a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts +++ b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts @@ -40,7 +40,7 @@ test("get,set,has,delete alters state as expected", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts index 1ce9ac97603..6bcbc788e2f 100644 --- a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts +++ b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts @@ -87,7 +87,7 @@ test("PluginKeychainMemory", (t1: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory.test.ts b/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory.test.ts index fd4eddaa1fb..1035e2b8d13 100644 --- a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory.test.ts +++ b/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory.test.ts @@ -23,7 +23,7 @@ describe(testcase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts index fdc15077ad0..287c5561ea9 100644 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts +++ b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts @@ -46,7 +46,7 @@ test("NodeJS API client + Rust plugin works together", async (tMain: Test) => { tMain.comment(`CactusKeychainVaultServer (Port=${hostPort}) started OK`); const configuration = new Configuration({ - basePath: `http://localhost:${hostPort}`, + basePath: `http://127.0.0.1:${hostPort}`, }); const apiClient = new DefaultApi(configuration); diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts index fff004fcb84..55174f1250e 100644 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -68,7 +68,7 @@ test(`${testCase}`, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts index 681f3281caa..ba5d3cc921d 100644 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts +++ b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts @@ -65,7 +65,7 @@ test("get,set,has,delete alters state", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -205,7 +205,7 @@ test("API client get,set,has,delete alters state", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts index b5ebc7edbba..0505bfdc6d0 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts @@ -106,7 +106,7 @@ test(testCase, async (t: Test) => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts index a9244d3ab52..b623f769ca1 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts @@ -102,7 +102,7 @@ test(testCase, async (t: Test) => { path: Constants.SocketIoConnectionPathV1, }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts index 05700f8fe32..2e5bbbfb95e 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts @@ -109,7 +109,7 @@ test(testCase, async (t: Test) => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts index d2f62b8fc40..b7126d7f51f 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts @@ -104,7 +104,7 @@ test(testCase, async (t: Test) => { path: Constants.SocketIoConnectionPathV1, }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts index 69a745a6d89..c7b258e9161 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts @@ -60,7 +60,7 @@ describe(__filename, () => { await connector.registerWebServices(expressApp, wsApi); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-cdl-socketio/src/test/typescript/integration/cdl-connector-manual.test.ts b/packages/cactus-plugin-ledger-connector-cdl-socketio/src/test/typescript/integration/cdl-connector-manual.test.ts index a4aa29f07c0..56fe65e8c26 100644 --- a/packages/cactus-plugin-ledger-connector-cdl-socketio/src/test/typescript/integration/cdl-connector-manual.test.ts +++ b/packages/cactus-plugin-ledger-connector-cdl-socketio/src/test/typescript/integration/cdl-connector-manual.test.ts @@ -161,7 +161,7 @@ describe("CDL Connector manual tests", () => { // Create ApiClient instance const apiConfigOptions = { validatorID: "cdl-connector-manual.test", - validatorURL: `https://localhost:${connectorAddress.port}`, + validatorURL: `https://127.0.0.1:${connectorAddress.port}`, validatorKeyPath: VALIDATOR_KEY_PATH, logLevel: sutLogLevel, maxCounterRequestID: 1000, diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts index c16bc38f0db..024260f04de 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts @@ -324,7 +324,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts index 21eda4ee24c..c370a288d5b 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts @@ -143,7 +143,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts index a88ee54434f..61ec03e36c6 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts @@ -325,7 +325,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts index eb719c36ae1..d0a44cca512 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts @@ -329,7 +329,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts index a720995b161..e6f8ad60b27 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts @@ -10,7 +10,7 @@ import { ECCurveType } from "./internal/crypto-util"; export interface IVaultTransitClientOptions { // full url of vault server - // eg : http://localhost:8200 + // eg : http://127.0.0.1:8200 endpoint: string; // mountPath of transit secret engine diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts index c8f48d1c75c..958d68fd1c4 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts @@ -10,7 +10,7 @@ import { WsIdentityClient } from "ws-identity-client"; export interface WSClientOptions { // full url of web-socket identity server - // eg : http://localhost:8700 + // eg : http://127.0.0.1:8700 endpoint: string; // pathPrefix for incoming web-socket connections diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/deploy-cc-from-golang-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/deploy-cc-from-golang-source.test.ts index ab0ba551604..fcdf0eeca50 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/deploy-cc-from-golang-source.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/deploy-cc-from-golang-source.test.ts @@ -149,7 +149,7 @@ test.skip(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -159,7 +159,7 @@ test.skip(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); const apiClient = new FabricApi(config); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/run-transaction-endpoint-v1.test.ts index bba7ebde5ab..ae0764052a6 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/run-transaction-endpoint-v1.test.ts @@ -127,7 +127,7 @@ test.skip(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts index 6f9f30262f1..48192e790c6 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts @@ -82,13 +82,13 @@ describe(testCase, () => { await ledger.start({ omitPull: false }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; ({ port } = addressInfo); - apiUrl = `http://localhost:${port}`; + apiUrl = `http://127.0.0.1:${port}`; configuration = new Configuration({ basePath: apiUrl }); apiClient = new FabricApi(configuration); @@ -377,8 +377,8 @@ describe(testCase, () => { keychainRef: keychainEntryKey, }, }); - - + + */ const getResQuery = await apiClient.runTransactionV1({ diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts index 39f02540883..0513ce02e6e 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts @@ -165,7 +165,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -175,7 +175,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts index 7a70bfbb766..51d3be707a6 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts @@ -167,7 +167,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -177,7 +177,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts index 439332ced7d..3d9ecdbacff 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts @@ -165,7 +165,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -175,7 +175,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-lock-asset.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-lock-asset.test.ts index 7d31bdd4abc..ca4afd15f46 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-lock-asset.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-lock-asset.test.ts @@ -170,7 +170,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -180,7 +180,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts index f9e9337d8e0..7ef4945eb21 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts @@ -99,7 +99,7 @@ describe(testCase, () => { await ledger.start({ omitPull: false }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts index fa705a84cbb..365ae19f183 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts @@ -105,7 +105,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -121,7 +121,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); const apiClient = new FabricApi(config); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts index c1e9c9f2562..ad579a9fbe6 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -160,7 +160,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -176,7 +176,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); diff --git a/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/src/test/typescript/integration/go-ethereum-socketio-connector.test.ts b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/src/test/typescript/integration/go-ethereum-socketio-connector.test.ts index 12c1ff0faec..89f42105422 100644 --- a/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/src/test/typescript/integration/go-ethereum-socketio-connector.test.ts +++ b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/src/test/typescript/integration/go-ethereum-socketio-connector.test.ts @@ -112,7 +112,7 @@ describe("Go-Ethereum-SocketIO connector tests", () => { // Generate connector private key and certificate const pkiGenerator = new SelfSignedPkiGenerator(); - const pki = pkiGenerator.create("localhost"); + const pki = pkiGenerator.create("127.0.0.1"); connectorPrivKeyValue = pki.privateKeyPem; connectorCertValue = pki.certificatePem; const jwtAlgo = "RS512"; @@ -151,7 +151,7 @@ describe("Go-Ethereum-SocketIO connector tests", () => { // Create ApiClient instance const apiConfigOptions = { validatorID: "go-eth-socketio-test", - validatorURL: `https://localhost:${connectorAddress.port}`, + validatorURL: `https://127.0.0.1:${connectorAddress.port}`, validatorKeyValue: connectorCertValue, logLevel: sutLogLevel, maxCounterRequestID: 1000, diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts index 498b9ea0b7c..77c8041455c 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts @@ -143,7 +143,7 @@ describe("Generate and send signed transaction tests", () => { expressApp.use(bodyParser.json({ limit: "250mb" })); connectorServer = http.createServer(expressApp); const listenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: connectorServer, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts index 9e8fba0be05..1ffc23c1ba6 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts @@ -137,7 +137,7 @@ test.skip(testCase, async (t: Test) => { expressApp1.use(bodyParser.json({ limit: "250mb" })); const server1 = http.createServer(expressApp1); const listenOptions1: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: server1, }; @@ -151,7 +151,7 @@ test.skip(testCase, async (t: Test) => { expressApp2.use(bodyParser.json({ limit: "250mb" })); const server2 = http.createServer(expressApp2); const listenOptions2: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: server2, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts index d738621eaa7..adc9fcd2095 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts @@ -207,7 +207,7 @@ describe("Iroha SocketIo TestSuite", () => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts index 58584b4133c..d004a712a56 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -114,7 +114,7 @@ test(testCase, async (t: Test) => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts index 5b1ef80009b..a9bc2ab8421 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts @@ -107,7 +107,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts index e066d2fb2c9..e4ddb2420af 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts @@ -23,7 +23,7 @@ test("Iroha environment variables passed correctly", async (t: Test) => { ]; const irohaOptions = { - postgresHost: "localhost", + postgresHost: "127.0.0.1", postgresPort: 5432, envVars: simpleEnvVars, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation-no-keychain.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation-no-keychain.test.ts index 26294d40079..9691f9215e8 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation-no-keychain.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation-no-keychain.test.ts @@ -83,7 +83,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation.test.ts index ab526847938..5a6694949c5 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation.test.ts @@ -105,7 +105,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object-endpoints.test.ts index 2ba9222d36a..ea85cd1951d 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object-endpoints.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object-endpoints.test.ts @@ -87,7 +87,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object.test.ts index ae31bf21050..88141afedc8 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object.test.ts @@ -87,7 +87,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object-endpoints.test.ts index bb1066d1d6b..e1164b97561 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object-endpoints.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object-endpoints.test.ts @@ -73,7 +73,7 @@ test("Quorum Ledger Connector Plugin", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object-endpoints.test.ts index 17ce5c67f62..121064e3f68 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object-endpoints.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object-endpoints.test.ts @@ -84,7 +84,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object.test.ts index 8b86d175613..b6af9ab35fc 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object.test.ts @@ -84,7 +84,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json.test.ts index 69edb85e67a..aa98b648da6 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json.test.ts @@ -112,7 +112,7 @@ describe(testCase, () => { pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object-endpoints.test.ts index 968ec8f8d3c..4479b17ae73 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object-endpoints.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object-endpoints.test.ts @@ -73,7 +73,7 @@ test("Quorum Ledger Connector Plugin", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts index 15aacd8d4a7..d9122a7e2b5 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts +++ b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts @@ -76,7 +76,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts index be0d8f17d16..5e2916df6a4 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts +++ b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts @@ -102,7 +102,7 @@ describe(testCase, () => { pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), })) as PluginLedgerConnectorXdai; const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts index 8730f55984e..44e59e2c142 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts +++ b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts @@ -72,7 +72,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts index 30cd494476e..712ba58135b 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -99,7 +99,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts index 6916fa60446..c7faa43c059 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts @@ -144,7 +144,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -282,7 +282,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -493,7 +493,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -617,7 +617,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -636,7 +636,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -801,7 +801,7 @@ test("client gateway crashes after lock fabric asset", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts index e152204ce9f..590e4fd431c 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts @@ -141,7 +141,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -279,7 +279,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -489,7 +489,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -607,7 +607,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -626,7 +626,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -827,7 +827,7 @@ test("client gateway crashes after deleting fabric asset", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts index 06d414a8b7e..2b25f13e641 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts @@ -141,7 +141,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -279,7 +279,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -490,7 +490,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -608,7 +608,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -627,7 +627,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -763,7 +763,7 @@ test("client gateway crashes after lock fabric asset", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts index dff7aff3122..ed2d4b4d59a 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts @@ -76,7 +76,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -125,7 +125,7 @@ beforeAll(async () => { serverExpressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayserver = http.createServer(serverExpressApp); serverListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: recipientGatewayserver, }; @@ -165,7 +165,7 @@ beforeAll(async () => { clientExpressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(clientExpressApp); clientListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 2000, server: sourceGatewayServer, }; @@ -289,7 +289,7 @@ test("successful run ODAP after client gateway crashed after after receiving tra clientExpressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(clientExpressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 2000, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts index 52928195bcd..f1e10e88904 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts @@ -136,7 +136,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -274,7 +274,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -480,7 +480,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -574,7 +574,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -593,7 +593,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts index 4510dfad615..a21835235f1 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts @@ -63,7 +63,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -134,7 +134,7 @@ test("runs ODAP between two gateways via openApi", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayserver = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: recipientGatewayserver, }; @@ -153,7 +153,7 @@ test("runs ODAP between two gateways via openApi", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 2000, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts index 2e3cb92993a..c70f86093e7 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts @@ -141,7 +141,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -282,7 +282,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -492,7 +492,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -608,7 +608,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -627,7 +627,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -862,7 +862,7 @@ test("client sends rollback message at the end of the protocol", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts index 850494b8524..cb0af776c80 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts @@ -50,7 +50,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts index 8b2d7c5a5fb..27bbc707acf 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts @@ -141,7 +141,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -278,7 +278,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -488,7 +488,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -610,7 +610,7 @@ beforeEach(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -629,7 +629,7 @@ beforeEach(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -849,7 +849,7 @@ test("server gateway crashes after creating besu asset", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts index 3e588b34e95..bc5a9a07bb5 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts @@ -77,7 +77,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -125,7 +125,7 @@ beforeAll(async () => { serverExpressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayserver = http.createServer(serverExpressApp); serverListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: recipientGatewayserver, }; @@ -165,7 +165,7 @@ beforeAll(async () => { clientExpressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(clientExpressApp); clientListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 2000, server: sourceGatewayServer, }; @@ -253,7 +253,7 @@ test("server gateway crashes after transfer initiation flow", async () => { serverExpressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayserver = http.createServer(serverExpressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: recipientGatewayserver, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-final.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-final.test.ts index 1c1ba8dc55d..1c0f150c52b 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-final.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-final.test.ts @@ -60,7 +60,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts index f57c88fccd1..d54a90447c1 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -71,7 +71,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-success.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-success.test.ts index 4c1d884654c..a58da38eeb5 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-success.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-success.test.ts @@ -53,7 +53,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts index 55b4ce61064..cfac6f365a7 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts @@ -54,7 +54,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update.test.ts index bddd607fbd7..824b35e4c60 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update.test.ts @@ -64,7 +64,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts index e0414ba4e1c..16fcbf3e6f0 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts @@ -57,7 +57,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-final.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-final.test.ts index 65e29de27d9..b0cfb6d2ae0 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-final.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-final.test.ts @@ -61,7 +61,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/lock-evidence.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/lock-evidence.test.ts index 5ade55da597..eecbe05865f 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/lock-evidence.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/lock-evidence.test.ts @@ -64,7 +64,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts b/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts index 5810d8b3da4..d5e2e6892c4 100644 --- a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts +++ b/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts @@ -91,11 +91,11 @@ describe("Ethereum persistence PostgreSQL PostgresDatabaseClient tests", () => { await postgresContainer.start(); const postgresPort = await postgresContainer.getPostgresPort(); expect(postgresPort).toBeTruthy(); - log.info(`Postgres running at localhost:${postgresPort}`); + log.info(`Postgres running at 127.0.0.1:${postgresPort}`); log.info("Create PostgresDatabaseClient"); dbClient = new PostgresDatabaseClient({ - connectionString: `postgresql://postgres:postgres@localhost:${postgresPort}/postgres`, + connectionString: `postgresql://postgres:postgres@127.0.0.1:${postgresPort}/postgres`, logLevel: sutLogLevel, }); diff --git a/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-db-client.test.ts b/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-db-client.test.ts index 36e8f609f0d..6dfd66b2733 100644 --- a/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-db-client.test.ts +++ b/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-db-client.test.ts @@ -58,11 +58,11 @@ describe("Fabric persistence PostgreSQL PostgresDatabaseClient tests", () => { const postgresPort = await postgresContainer.getPostgresPort(); expect(postgresPort).toBeTruthy(); - log.info(`Postgres running at localhost:${postgresPort}`); + log.info(`Postgres running at 127.0.0.1:${postgresPort}`); log.info("Create PostgresDatabaseClient"); dbClient = new PostgresDatabaseClient({ - connectionString: `postgresql://postgres:postgres@localhost:${postgresPort}/postgres`, + connectionString: `postgresql://postgres:postgres@127.0.0.1:${postgresPort}/postgres`, logLevel: sutLogLevel, }); diff --git a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts index 6b94e22752a..864409efca5 100644 --- a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts +++ b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts @@ -68,7 +68,7 @@ describe(testCase, () => { console.log(`CactusKeychainVaultServer (Port=${hostPort}) started OK`); const configuration = new Configuration({ - basePath: `http://localhost:${hostPort}`, + basePath: `http://127.0.0.1:${hostPort}`, }); const apiClient = new DefaultApi(configuration); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts index 8c7fb285f4d..ed273dacbbe 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts @@ -72,7 +72,7 @@ describe(testCase, () => { await besuTestLedger.start(); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts index 105970c4943..ae58a1a7233 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts @@ -132,7 +132,7 @@ describe(testCase, () => { pluginRegistry.add(pluginHtlc); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts index 0f088b51ed5..f710734fee9 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts @@ -123,7 +123,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -345,7 +345,7 @@ test("Test get invalid id status", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts index 2ff390bec7b..3b5b36f9fce 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts @@ -117,7 +117,7 @@ describe(testCase, () => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts index a34f11df5d6..4e3f8b4bd4b 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts @@ -145,7 +145,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts index e3386a0e636..4e81c9a2266 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts @@ -86,7 +86,7 @@ describe(testCase, () => { await besuTestLedger.start(); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts index 2815a64610a..1d4b6f605d3 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts @@ -131,7 +131,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -409,7 +409,7 @@ test("Test invalid refund with invalid time", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts index 78ea6619fd8..d22c18ed643 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts @@ -46,7 +46,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts index 136cc1338da..4374082ca58 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts @@ -116,7 +116,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts index 49a0869da1c..a6b7ccd2d62 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts @@ -46,7 +46,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts index e4082b0ae3b..e779a07c460 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts @@ -48,7 +48,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts index 485ce2d5472..aa6e42836ed 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts @@ -40,7 +40,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts index 71b8eb78894..6871560a46a 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts @@ -41,7 +41,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts index 5eae6f04084..bf5ffd75a11 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts @@ -46,7 +46,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts index db8243b925b..0c1b1de8269 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts @@ -46,7 +46,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts index 4bf3f895d55..3a8524c4cd2 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts @@ -137,7 +137,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts index 7095e3bd7a4..0ae53cf4d06 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts @@ -45,7 +45,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts index 657f33567b3..3cb236c555f 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts @@ -50,7 +50,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts index ab4676212b9..f9d7ab63a89 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts @@ -47,7 +47,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts index c8a825f1252..5810fd86a5a 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts @@ -53,7 +53,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-client/verifier-integration-with-besu-connector.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-client/verifier-integration-with-besu-connector.test.ts index d59459f52ac..50afcda6174 100644 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-client/verifier-integration-with-besu-connector.test.ts +++ b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-client/verifier-integration-with-besu-connector.test.ts @@ -128,7 +128,7 @@ describe("Verifier integration with besu connector tests", () => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts index 8eb5f247c52..8ebe12f9213 100644 --- a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts @@ -254,7 +254,7 @@ export class BesuTestLedger implements ITestLedger { Healthcheck: { Test: [ "CMD-SHELL", - `curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' localhost:8545`, + `curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' 127.0.0.1:8545`, ], Interval: 1000000000, // 1 second Timeout: 3000000000, // 3 seconds @@ -375,7 +375,7 @@ export class BesuTestLedger implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/common/containers.ts b/packages/cactus-test-tooling/src/main/typescript/common/containers.ts index 3aac196ee4f..fbedd731ef3 100644 --- a/packages/cactus-test-tooling/src/main/typescript/common/containers.ts +++ b/packages/cactus-test-tooling/src/main/typescript/common/containers.ts @@ -380,7 +380,7 @@ export class Containers { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${privatePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${privatePort} mapped to localhost`); + throw new Error(`${fnTag} port ${privatePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts b/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts index 8d846815616..642217a096d 100644 --- a/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts @@ -205,12 +205,12 @@ export class CordaConnectorContainer { public async getSupervisorDLocalhostUrl(): Promise { const port = await this.getSupervisorDPublicPort(); - return `http://localhost:${port}`; + return `http://127.0.0.1:${port}`; } public async getApiLocalhostUrl(): Promise { const port = await this.getApiPublicPort(); - return `http://localhost:${port}`; + return `http://127.0.0.1:${port}`; } public getContainer(): Container { diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts index 9d25235a6fd..be12dbed748 100644 --- a/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts @@ -151,7 +151,7 @@ export class CordaTestLedger implements ITestLedger { // Healthcheck: { // Test: [ // "CMD-SHELL", - // `curl -v 'http://localhost:7005/jolokia/exec/org.apache.activemq.artemis:address=%22rpc.server%22,broker=%22RPC%22,component=addresses,queue=%22rpc.server%22,routing-type=%22multicast%22,subcomponent=queues/countMessages()/'`, + // `curl -v 'http://127.0.0.1:7005/jolokia/exec/org.apache.activemq.artemis:address=%22rpc.server%22,broker=%22RPC%22,component=addresses,queue=%22rpc.server%22,routing-type=%22multicast%22,subcomponent=queues/countMessages()/'`, // ], // Interval: 1000000000, // 1 second // Timeout: 3000000000, // 3 seconds @@ -333,7 +333,7 @@ export class CordaTestLedger implements ITestLedger { public async getSupervisorDLocalhostUrl(): Promise { const port = await this.getSupervisorDPublicPort(); - return `http://localhost:${port}`; + return `http://127.0.0.1:${port}`; } public async getSSHPublicPort(): Promise { diff --git a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts b/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts index 2c674854730..976bf9232cf 100644 --- a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts +++ b/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts @@ -389,20 +389,20 @@ export class FabricTestLedgerV1 implements ITestLedger { // peer0.org1.example.com const privatePort = 7051; const hostPort = await Containers.getPublicPort(privatePort, cInfo); - ccp.peers["peer0.org1.example.com"].url = `grpcs://localhost:${hostPort}`; + ccp.peers["peer0.org1.example.com"].url = `grpcs://127.0.0.1:${hostPort}`; } if (ccp.peers["peer1.org1.example.com"]) { // peer1.org1.example.com const privatePort = 8051; const hostPort = await Containers.getPublicPort(privatePort, cInfo); - ccp.peers["peer1.org1.example.com"].url = `grpcs://localhost:${hostPort}`; + ccp.peers["peer1.org1.example.com"].url = `grpcs://127.0.0.1:${hostPort}`; } { // ca_peerOrg1 const privatePort = 7054; const hostPort = await Containers.getPublicPort(privatePort, cInfo); const { certificateAuthorities: cas } = ccp; - cas["ca.org1.example.com"].url = `https://localhost:${hostPort}`; + cas["ca.org1.example.com"].url = `https://127.0.0.1:${hostPort}`; } // FIXME - this still doesn't work. At this moment the only successful tests @@ -417,7 +417,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const privatePort = 7050; const hostPort = await Containers.getPublicPort(privatePort, cInfo); - const url = `grpcs://localhost:${hostPort}`; + const url = `grpcs://127.0.0.1:${hostPort}`; const ORDERER_PEM_PATH_FABRIC_V1 = "/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"; const ORDERER_PEM_PATH_FABRIC_V2 = @@ -462,11 +462,11 @@ export class FabricTestLedgerV1 implements ITestLedger { // with discovery // { // const { grpcOptions } = ccp.peers["peer0.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; + // grpcOptions.hostnameOverride = `127.0.0.1`; // } // { // const { grpcOptions } = ccp.peers["peer1.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; + // grpcOptions.hostnameOverride = `127.0.0.1`; // } } return ccp; @@ -516,7 +516,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const privatePortPeer0 = parseFloat(urlGrpcs.replace(/^\D+/g, "")); const hostPort = await Containers.getPublicPort(privatePortPeer0, cInfo); - ccp["peers"][peer0Name]["url"] = `grpcs://localhost:${hostPort}`; + ccp["peers"][peer0Name]["url"] = `grpcs://127.0.0.1:${hostPort}`; // if there is a peer1 if (ccp.peers["peer1.org" + orgName + ".example.com"]) { @@ -527,7 +527,7 @@ export class FabricTestLedgerV1 implements ITestLedger { privatePortPeer1, cInfo, ); - ccp["peers"][peer1Name]["url"] = `grpcs://localhost:${hostPortPeer1}`; + ccp["peers"][peer1Name]["url"] = `grpcs://127.0.0.1:${hostPortPeer1}`; } { // ca_peerOrg1 @@ -537,7 +537,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const caHostPort = await Containers.getPublicPort(caPort, cInfo); const { certificateAuthorities: cas } = ccp; - cas[caName].url = `https://localhost:${caHostPort}`; + cas[caName].url = `https://127.0.0.1:${caHostPort}`; } // FIXME - this still doesn't work. At this moment the only successful tests @@ -552,7 +552,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const privatePort = 7050; const hostPort = await Containers.getPublicPort(privatePort, cInfo); - const url = `grpcs://localhost:${hostPort}`; + const url = `grpcs://127.0.0.1:${hostPort}`; const ORDERER_PEM_PATH_FABRIC_V1 = "/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"; const ORDERER_PEM_PATH_FABRIC_V2 = @@ -597,11 +597,11 @@ export class FabricTestLedgerV1 implements ITestLedger { // with discovery // { // const { grpcOptions } = ccp.peers["peer0.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; + // grpcOptions.hostnameOverride = `127.0.0.1`; // } // { // const { grpcOptions } = ccp.peers["peer1.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; + // grpcOptions.hostnameOverride = `127.0.0.1`; // } } return ccp; @@ -1277,7 +1277,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const containerInfo = await this.getContainerInfo(); const port = await Containers.getPublicPort(22, containerInfo); const sshConfig: SshConfig = { - host: "localhost", + host: "127.0.0.1", privateKey, username: "root", port, diff --git a/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts b/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts index b95a6d6e92a..75723d93044 100644 --- a/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts @@ -181,7 +181,7 @@ export class HttpEchoContainer implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/iroha/iroha-test-ledger.ts index 407ccbceb08..d60711e2bf1 100644 --- a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/iroha/iroha-test-ledger.ts @@ -442,7 +442,7 @@ export class IrohaTestLedger implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts index 0a3b11c8403..de74d16735a 100644 --- a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts @@ -294,7 +294,7 @@ export class Iroha2TestLedger implements ITestLedger { /** * Change the port in URL from original to the one that was exported by docker - * (i.e. the one that is available in `localhost` running this container, not inside the container). + * (i.e. the one that is available in `127.0.0.1` running this container, not inside the container). * * @param url some URL ending with a port (e.g. `http://127.0.0.1:8080`) * @param containerInfo dockerode container info. @@ -320,7 +320,7 @@ export class Iroha2TestLedger implements ITestLedger { /** * Read client config file from the container. Adjust the ports in URL so that the endpoints - * can be used from localhost. + * can be used from 127.0.0.1. * * @returns parsed `Iroha2ClientConfig` */ diff --git a/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts b/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts index 1cec545ed29..30aa9f1c058 100644 --- a/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts @@ -101,7 +101,7 @@ export class KeycloakContainer { this.log.debug(`Effective Env of container: %o`, Env); const Healthcheck = { - Test: ["CMD-SHELL", `curl -v 'http://localhost:9990/'`], + Test: ["CMD-SHELL", `curl -v 'http://127.0.0.1:9990/'`], Interval: 1000000000, // 1 second Timeout: 3000000000, // 3 seconds Retries: 99, @@ -144,7 +144,7 @@ export class KeycloakContainer { // tokenURL: "https://www.example.com/oauth2/token", // clientID: "EXAMPLE_CLIENT_ID", // clientSecret: "EXAMPLE_CLIENT_SECRET", - // callbackURL: "http://localhost:3000/auth/example/callback", + // callbackURL: "http://127.0.0.1:3000/auth/example/callback", // } public async getOauth2Options(clientId = "account"): Promise { const fnTag = `${this.className}#getOauth2Options()`; @@ -219,7 +219,7 @@ export class KeycloakContainer { Checks.truthy(clientId, `${fnTag}:clientId`); const { log } = this; const defaultRealm = await this.getDefaultRealm(); - const apiBaseUrl = await this.getApiBaseUrl("localhost"); + const apiBaseUrl = await this.getApiBaseUrl("127.0.0.1"); const realm = defaultRealm.realm; const realmBaseUrl = `${apiBaseUrl}/realms/${realm}`; @@ -228,7 +228,7 @@ export class KeycloakContainer { const client = clients.find((c) => c.clientId === clientId); log.debug("SAML2 client: %o", JSON.stringify(client, null, 4)); - // http://localhost:32819/auth/realms/master/protocol/saml + // http://127.0.0.1:32819/auth/realms/master/protocol/saml const saml2Opts = { entryPoint: `${realmBaseUrl}/protocol/saml`, // issuer: 'https://your-app.example.net/login/callback', diff --git a/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts b/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts index ac8dfc56362..628b9ffa2a2 100644 --- a/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts @@ -100,7 +100,7 @@ export class LocalStackContainer { Healthcheck: { Test: [ "CMD-SHELL", - 'curl -s localhost:4566/health | grep \'"secretsmanager": "running"\'', + 'curl -s 127.0.0.1:4566/health | grep \'"secretsmanager": "running"\'', ], Interval: 100 * 1000000, }, diff --git a/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts index 7a8fed5821b..f7bf1bf17d7 100644 --- a/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts @@ -124,7 +124,7 @@ export class OpenEthereumTestLedger { const Env = [...[], ...this.envVars]; this.log.debug(`Effective Env of container: %o`, Env); - const apiUrl = await this.getRpcApiHttpHost("localhost", this.httpPort); + const apiUrl = await this.getRpcApiHttpHost("127.0.0.1", this.httpPort); const Healthcheck = { Test: ["CMD-SHELL", `curl -v '${apiUrl}'`], Interval: 1000000000, // 1 second diff --git a/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts b/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts index 97fd5e4e0d5..9a203ba8e7e 100644 --- a/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts @@ -256,7 +256,7 @@ export class PostgresTestContainer implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts index c1b0838c4f6..45b366d0b72 100644 --- a/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts @@ -360,7 +360,7 @@ export class QuorumTestLedger implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } @@ -383,7 +383,7 @@ export class QuorumTestLedger implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts index c68311bf391..89538dfbb1d 100644 --- a/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts @@ -227,7 +227,7 @@ export class SawtoothTestLedger implements ITestLedger { } /** - * Get localhost port that can be used to access ledger rest API in the container. + * Get 127.0.0.1 port that can be used to access ledger rest API in the container. * * @returns port */ @@ -243,7 +243,7 @@ export class SawtoothTestLedger implements ITestLedger { } /** - * Get localhost URL that can be used to access ledger rest API in the container. + * Get 127.0.0.1 URL that can be used to access ledger rest API in the container. * * @returns Sawtooth Rest API URL. */ diff --git a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts b/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts index c4515322f70..07acde51994 100644 --- a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts +++ b/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts @@ -39,7 +39,7 @@ export function createListeningMockServer(): Promise<[Server, string]> { } /** - * Create client socket to localhost. + * Create client socket to 127.0.0.1. * * @port - Localhost port to connect to. */ @@ -52,7 +52,7 @@ export function createClientSocket(port: string): ClientSocket { transports: ["websocket"], }; - return io(`http://localhost:${port}`, clientSocketOpts as any); + return io(`http://127.0.0.1:${port}`, clientSocketOpts as any); } /** diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts index 2d88446d112..2af3ed0865c 100644 --- a/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts +++ b/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts @@ -36,8 +36,8 @@ test("starts/stops/destroys a docker container", async (assert: Test) => { assert.ok(hostPort, "getRpcApiPublicPort() returns truthy OK"); assert.ok(isFinite(hostPort), "getRpcApiPublicPort() returns finite OK"); - const isReachable = await isPortReachable(hostPort, { host: "localhost" }); - assert.ok(isReachable, `HostPort ${hostPort} is reachable via localhost`); + const isReachable = await isPortReachable(hostPort, { host: "127.0.0.1" }); + assert.ok(isReachable, `HostPort ${hostPort} is reachable via 127.0.0.1`); const besuKeyPair: IKeyPair = await besuTestLedger.getBesuKeyPair(); assert.ok(besuKeyPair, "getBesuKeyPair() returns truthy OK"); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha-test-ledger/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha-test-ledger/constructor-validates-options.test.ts index 3209b1f8915..92fd7a35a68 100644 --- a/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha-test-ledger/constructor-validates-options.test.ts +++ b/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha-test-ledger/constructor-validates-options.test.ts @@ -18,7 +18,7 @@ test.skip("constructor throws if invalid input is provided", (t: Test) => { () => new IrohaTestLedger({ imageVersion: "nope", - postgresHost: "localhost", + postgresHost: "127.0.0.1", postgresPort: 5432, }), ); @@ -30,7 +30,7 @@ test.skip("constructor does not throw if valid input is provided", (t: Test) => t.doesNotThrow( () => new IrohaTestLedger({ - postgresHost: "localhost", + postgresHost: "127.0.0.1", postgresPort: 5432, }), ); @@ -97,8 +97,8 @@ test.skip("starts/stops/destroys a docker container", async (t: Test) => { t.ok(hostPort, "getRpcApiPublicPort() returns truthy OK"); t.ok(isFinite(hostPort), "getRpcApiPublicPort() returns finite OK"); - const isReachable = await isPortReachable(hostPort, { host: "localhost" }); - t.ok(isReachable, `HostPort ${hostPort} is reachable via localhost`); + const isReachable = await isPortReachable(hostPort, { host: "127.0.0.1" }); + t.ok(isReachable, `HostPort ${hostPort} is reachable via 127.0.0.1`); const irohaKeyPair: IKeyPair = await irohaTestLedger.getNodeKeyPair(); t.ok(irohaKeyPair, "getIrohaKeyPair() returns truthy OK"); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts index f55d840e171..d2bd7938a11 100644 --- a/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts +++ b/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts @@ -35,8 +35,8 @@ test("starts/stops/destroys a docker container", async (assert: Test) => { assert.ok(hostPort, "getRpcApiPublicPort() returns truthy OK"); assert.ok(isFinite(hostPort), "getRpcApiPublicPort() returns finite OK"); - const isReachable = await isPortReachable(hostPort, { host: "localhost" }); - assert.ok(isReachable, `HostPort ${hostPort} is reachable via localhost`); + const isReachable = await isPortReachable(hostPort, { host: "127.0.0.1" }); + assert.ok(isReachable, `HostPort ${hostPort} is reachable via 127.0.0.1`); assert.end(); }); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/quorum/quorum-test-ledger/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/quorum/quorum-test-ledger/constructor-validates-options.test.ts index 0668843b1c8..285d8770fa3 100644 --- a/packages/cactus-test-tooling/src/test/typescript/integration/quorum/quorum-test-ledger/constructor-validates-options.test.ts +++ b/packages/cactus-test-tooling/src/test/typescript/integration/quorum/quorum-test-ledger/constructor-validates-options.test.ts @@ -39,8 +39,8 @@ tap.test("starts/stops/destroys a docker container", async (assert: any) => { assert.ok(hostPort, "getRpcApiPublicPort() returns truthy OK"); assert.ok(isFinite(hostPort), "getRpcApiPublicPort() returns finite OK"); - const isReachable = await isPortReachable(hostPort, { host: "localhost" }); - assert.ok(isReachable, `HostPort ${hostPort} is reachable via localhost`); + const isReachable = await isPortReachable(hostPort, { host: "127.0.0.1" }); + assert.ok(isReachable, `HostPort ${hostPort} is reachable via 127.0.0.1`); const quorumKeyPair: IKeyPair = await ledger.getQuorumKeyPair(); assert.ok(quorumKeyPair); diff --git a/packages/cactus-test-verifier-client/src/main/typescript/verifier-with-go-eth-stress-check.ts b/packages/cactus-test-verifier-client/src/main/typescript/verifier-with-go-eth-stress-check.ts index 78019f39bee..614a4f66ec1 100644 --- a/packages/cactus-test-verifier-client/src/main/typescript/verifier-with-go-eth-stress-check.ts +++ b/packages/cactus-test-verifier-client/src/main/typescript/verifier-with-go-eth-stress-check.ts @@ -100,7 +100,7 @@ async function setupEnvironment(): Promise { // Generate connector private key and certificate const pkiGenerator = new SelfSignedPkiGenerator(); - const pki = pkiGenerator.create("localhost"); + const pki = pkiGenerator.create("127.0.0.1"); connectorPrivKeyValue = pki.privateKeyPem; connectorCertValue = pki.certificatePem; const jwtAlgo = "RS512"; @@ -140,7 +140,7 @@ async function setupEnvironment(): Promise { { validatorID: "go-eth-socketio-test", validatorType: "legacy-socketio", - validatorURL: `https://localhost:${connectorAddress.port}`, + validatorURL: `https://127.0.0.1:${connectorAddress.port}`, validatorKeyValue: connectorCertValue, logLevel: sutLogLevel, maxCounterRequestID: 1000, diff --git a/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts b/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts index 6d85b4626c8..fe2f220046f 100644 --- a/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts +++ b/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts @@ -26,7 +26,7 @@ describe("Constructor Tests", () => { { validatorID: "besu_openapi_connector", validatorType: "BESU_2X", - basePath: "localhost", + basePath: "127.0.0.1", ledgerInfo: { ledgerAbstract: "Besu-OpenAPI Ledger", }, @@ -55,7 +55,7 @@ describe("Constructor Tests", () => { { validatorID: "", validatorType: "BESU_2X", - basePath: "localhost", + basePath: "127.0.0.1", username: "admin", password: "password", ledgerInfo: { diff --git a/weaver/samples/fabric/fabric-cli/src/commands/config/set.ts b/weaver/samples/fabric/fabric-cli/src/commands/config/set.ts index b11204f103a..ae8d00b5b58 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/config/set.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/config/set.ts @@ -21,7 +21,7 @@ const command: GluegunCommand = { commandHelp( print, toolbox, - `fabric-cli config set network1 relayEndpoint localhost:9080`, + `fabric-cli config set network1 relayEndpoint 127.0.0.1:9080`, `fabric-cli config set <${configKeys.join('|')}> `, [], command, diff --git a/weaver/samples/fabric/fabric-cli/src/commands/configure/membership.ts b/weaver/samples/fabric/fabric-cli/src/commands/configure/membership.ts index 6c71896cbdb..f599dc61673 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/configure/membership.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/configure/membership.ts @@ -26,7 +26,7 @@ const command: GluegunCommand = { commandHelp( print, toolbox, - 'fabric-cli configure network --local-network=network1 --target-network=network2 --iin-agent-endpoint=localhost:9500', + 'fabric-cli configure network --local-network=network1 --target-network=network2 --iin-agent-endpoint=127.0.0.1:9500', 'fabric-cli configure network --local-network=>', [ { @@ -76,7 +76,7 @@ const command: GluegunCommand = { print.error('IIN Agent endpoint does not contain port number.') return } - + // Create wallet credentials const [response, error] = await handlePromise(MembershipManager.syncMembershipFromIINAgent( diff --git a/weaver/samples/fabric/fabric-cli/src/commands/event/receive.ts b/weaver/samples/fabric/fabric-cli/src/commands/event/receive.ts index 791b3086037..c41e8d07a26 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/event/receive.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/event/receive.ts @@ -62,13 +62,13 @@ const command: GluegunCommand = { if (options.port) { port = options.port } - + const app = express(); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); - + app.post('/simple-event-callback', (req, res) => { console.log("Received Event State: ", req.body.state) if (req.body.state) { @@ -79,7 +79,7 @@ const command: GluegunCommand = { } res.status(200).send('Ok'); }); - console.log(`Server is running at https://localhost:${port}`); + console.log(`Server is running at https://127.0.0.1:${port}`); console.log(`Use endpoint '/simple-event-callback' for event publishing`); await app.listen(port); } diff --git a/weaver/samples/fabric/fabric-cli/src/commands/interop-helper.ts b/weaver/samples/fabric/fabric-cli/src/commands/interop-helper.ts index c69e6fe9fe1..602bb635f9a 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/interop-helper.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/interop-helper.ts @@ -36,7 +36,7 @@ const command: GluegunCommand = { commandHelp( print, toolbox, - `fabric-cli interop --local-network=network2 --requesting-org=Org1MSP localhost:9080/network1/mychannel:interop:Read:a`, + `fabric-cli interop --local-network=network2 --requesting-org=Org1MSP 127.0.0.1:9080/network1/mychannel:interop:Read:a`, 'fabric-cli interop
', [ { @@ -99,7 +99,7 @@ const command: GluegunCommand = { if (!options['user']) { options['user'] = `user1` //Default user } - // TEST: fabric-cli interop --local-network=network1 localhost:9081/Nick_Network/test + // TEST: fabric-cli interop --local-network=network1 127.0.0.1:9081/Nick_Network/test // Making Interop Call using gRPC calls. print.info('Making Interop Call using gRPC calls.') const relayEnv = getNetworkConfig(options['local-network']) @@ -110,12 +110,12 @@ const command: GluegunCommand = { ) return } - + try { const appChaincodeId = process.env.DEFAULT_APPLICATION_CHAINCODE ? process.env.DEFAULT_APPLICATION_CHAINCODE : 'simplestate' const applicationFunction = process.env.DEFAULT_APPLICATION_FUNC ? process.env.DEFAULT_APPLICATION_FUNC : 'Create' const { args, replaceIndices } = getChaincodeConfig(appChaincodeId, applicationFunction) - + await interopHelper( options['local-network'], await generateViewAddress( // Typically a noop, but for some functions, we may want to do some extra processing @@ -138,6 +138,6 @@ const command: GluegunCommand = { } } -// fabric-cli interop --local-network=network1 --sign=true localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:H -// fabric-cli interop --local-network=network2 --remote-network=network1 localhost:9080/Fabric_Network/mychannel:interop:Read:a +// fabric-cli interop --local-network=network1 --sign=true 127.0.0.1:9081/Corda_Network/127.0.0.1:10006#com.cordaSimpleApplication.flow.GetStateByKey:H +// fabric-cli interop --local-network=network2 --remote-network=network1 127.0.0.1:9080/Fabric_Network/mychannel:interop:Read:a module.exports = command diff --git a/weaver/samples/fabric/fabric-cli/src/commands/relay/send.ts b/weaver/samples/fabric/fabric-cli/src/commands/relay/send.ts index 94c20e49b10..c1964968a4a 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/relay/send.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/relay/send.ts @@ -34,7 +34,7 @@ const command: GluegunCommand = { commandHelp( print, toolbox, - `fabric-cli relay send localhost:9081/Fabric_Network/mychannel:interop:Read:TestState`, + `fabric-cli relay send 127.0.0.1:9081/Fabric_Network/mychannel:interop:Read:TestState`, 'fabric-cli relay send ', [ { @@ -161,5 +161,5 @@ const command: GluegunCommand = { }) } } -//localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:H +//127.0.0.1:9081/Corda_Network/127.0.0.1:10006#com.cordaSimpleApplication.flow.GetStateByKey:H module.exports = command