Skip to content
Snippets Groups Projects
Commit 60da2608 authored by Éloïs's avatar Éloïs
Browse files

Revert "[fix] ws2p integrations test : use different uuidfor each testing server"

This reverts commit a21ed389.
parent f53a3e56
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,6 @@ import { ...@@ -9,7 +9,6 @@ import {
} from "./tools/toolbox" } from "./tools/toolbox"
import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster" import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster"
import {WS2PConstants} from "../../app/modules/ws2p/lib/constants" import {WS2PConstants} from "../../app/modules/ws2p/lib/constants"
import {hashf} from "../../app/lib/common";
const assert = require('assert') const assert = require('assert')
...@@ -113,7 +112,7 @@ describe("WS2P client limitations", function() { ...@@ -113,7 +112,7 @@ describe("WS2P client limitations", function() {
const p1 = await s1.getPeer() const p1 = await s1.getPeer()
assert.deepEqual(p1.endpoints, [ assert.deepEqual(p1.endpoints, [
'BASIC_MERKLED_API 127.0.0.1 ' + portBMA1, 'BASIC_MERKLED_API 127.0.0.1 ' + portBMA1,
'WS2P '+hashf(catKeyring.pub).slice(0, 8).toUpperCase()+' 127.0.0.1 ' + portWS1 'WS2P 11111111 127.0.0.1 ' + portWS1
]) ])
await s2.writePeer(p1) await s2.writePeer(p1)
await (s1._server.ws2pCluster as WS2PCluster).startCrawling(true) await (s1._server.ws2pCluster as WS2PCluster).startCrawling(true)
...@@ -232,7 +231,7 @@ describe("WS2P client limitations", function() { ...@@ -232,7 +231,7 @@ describe("WS2P client limitations", function() {
// A server // A server
conf1.ws2p = { conf1.ws2p = {
upnp: false, upnp: false,
uuid: hashf(keyring.pub).slice(0, 8).toUpperCase(), uuid: '11111111',
host: '127.0.0.1', host: '127.0.0.1',
port: portWS, port: portWS,
remotehost: '127.0.0.1', remotehost: '127.0.0.1',
...@@ -240,7 +239,7 @@ describe("WS2P client limitations", function() { ...@@ -240,7 +239,7 @@ describe("WS2P client limitations", function() {
privilegedNodes: [] privilegedNodes: []
} }
const server = simpleTestingServer(conf1) const server = simpleTestingServer(conf1)
server._server.addEndpointsDefinitions(async () => 'WS2P '+conf1.ws2p.uuid+' 127.0.0.1 ' + portWS) server._server.addEndpointsDefinitions(async () => 'WS2P 11111111 127.0.0.1 ' + portWS)
return { server, portWS, portBMA } return { server, portWS, portBMA }
} }
}) })
...@@ -8,7 +8,6 @@ import { ...@@ -8,7 +8,6 @@ import {
} from "./tools/toolbox" } from "./tools/toolbox"
import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster" import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster"
import {WS2PConstants} from "../../app/modules/ws2p/lib/constants" import {WS2PConstants} from "../../app/modules/ws2p/lib/constants"
import {hashf} from "../../app/lib/common";
const assert = require('assert') const assert = require('assert')
...@@ -90,7 +89,7 @@ describe("WS2P cluster", function() { ...@@ -90,7 +89,7 @@ describe("WS2P cluster", function() {
const p1 = await s1.getPeer() const p1 = await s1.getPeer()
assert.deepEqual(p1.endpoints, [ assert.deepEqual(p1.endpoints, [
'BASIC_MERKLED_API 127.0.0.1 ' + portBMA1, 'BASIC_MERKLED_API 127.0.0.1 ' + portBMA1,
'WS2P '+hashf(catKeyring.pub).slice(0, 8).toUpperCase()+' 127.0.0.1 ' + portWS1 'WS2P 11111111 127.0.0.1 ' + portWS1
]) ])
await s2.writePeer(p1) await s2.writePeer(p1)
WS2PCluster.plugOn(s2._server); WS2PCluster.plugOn(s2._server);
...@@ -145,14 +144,14 @@ describe("WS2P cluster", function() { ...@@ -145,14 +144,14 @@ describe("WS2P cluster", function() {
// A server // A server
conf1.ws2p = { conf1.ws2p = {
upnp: false, upnp: false,
uuid: hashf(keyring.pub).slice(0, 8).toUpperCase(), uuid: '11111111',
host: '127.0.0.1', host: '127.0.0.1',
port: portWS, port: portWS,
remotehost: '127.0.0.1', remotehost: '127.0.0.1',
remoteport: portWS remoteport: portWS
} }
const server = simpleTestingServer(conf1) const server = simpleTestingServer(conf1)
server._server.addEndpointsDefinitions(async () => 'WS2P '+conf1.ws2p.uuid+' 127.0.0.1 ' + portWS) server._server.addEndpointsDefinitions(async () => 'WS2P 11111111 127.0.0.1 ' + portWS)
return { server, portWS, portBMA } return { server, portWS, portBMA }
} }
}) })
import {getNewTestingPort, simpleTestingConf, simpleTestingServer, simpleUser, TestingServer} from "./tools/toolbox" import {getNewTestingPort, simpleTestingConf, simpleTestingServer, simpleUser, TestingServer} from "./tools/toolbox"
import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster" import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster"
import {WS2PConstants} from "../../app/modules/ws2p/lib/constants" import {WS2PConstants} from "../../app/modules/ws2p/lib/constants"
import {hashf} from "../../app/lib/common";
const assert = require('assert') const assert = require('assert')
const should = require('should') const should = require('should')
...@@ -68,7 +67,7 @@ describe("WS2P heads propagation", function() { ...@@ -68,7 +67,7 @@ describe("WS2P heads propagation", function() {
const p1 = await s1.getPeer() const p1 = await s1.getPeer()
assert.deepEqual(p1.endpoints, [ assert.deepEqual(p1.endpoints, [
'BASIC_MERKLED_API 127.0.0.1 ' + portBMA1, 'BASIC_MERKLED_API 127.0.0.1 ' + portBMA1,
'WS2P '+hashf(catKeyring.pub).slice(0, 8).toUpperCase()+' 127.0.0.1 ' + portWS1 'WS2P 11111111 127.0.0.1 ' + portWS1
]) ])
await s2.writePeer(p1) await s2.writePeer(p1)
await (s1._server.ws2pCluster as WS2PCluster).startCrawling(true) await (s1._server.ws2pCluster as WS2PCluster).startCrawling(true)
...@@ -111,7 +110,7 @@ describe("WS2P heads propagation", function() { ...@@ -111,7 +110,7 @@ describe("WS2P heads propagation", function() {
// A server // A server
conf1.ws2p = { conf1.ws2p = {
upnp: false, upnp: false,
uuid: hashf(keyring.pub).slice(0, 8).toUpperCase(), uuid: '11111111',
host: '127.0.0.1', host: '127.0.0.1',
port: portWS, port: portWS,
remotehost: '127.0.0.1', remotehost: '127.0.0.1',
...@@ -119,7 +118,7 @@ describe("WS2P heads propagation", function() { ...@@ -119,7 +118,7 @@ describe("WS2P heads propagation", function() {
privilegedNodes: [] privilegedNodes: []
} }
const server = simpleTestingServer(conf1) const server = simpleTestingServer(conf1)
server._server.addEndpointsDefinitions(async () => 'WS2P '+conf1.ws2p.uuid+' 127.0.0.1 ' + portWS) server._server.addEndpointsDefinitions(async () => 'WS2P 11111111 127.0.0.1 ' + portWS)
return { server, portWS, portBMA } return { server, portWS, portBMA }
} }
}) })
...@@ -9,7 +9,6 @@ import { ...@@ -9,7 +9,6 @@ import {
} from "./tools/toolbox" } from "./tools/toolbox"
import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster" import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster"
import {WS2PConstants} from "../../app/modules/ws2p/lib/constants" import {WS2PConstants} from "../../app/modules/ws2p/lib/constants"
import {hashf} from "../../app/lib/common";
const assert = require('assert') const assert = require('assert')
...@@ -116,7 +115,7 @@ describe("WS2P server limitations", function() { ...@@ -116,7 +115,7 @@ describe("WS2P server limitations", function() {
const p1 = await s1.getPeer() const p1 = await s1.getPeer()
assert.deepEqual(p1.endpoints, [ assert.deepEqual(p1.endpoints, [
'BASIC_MERKLED_API 127.0.0.1 ' + portBMA1, 'BASIC_MERKLED_API 127.0.0.1 ' + portBMA1,
'WS2P '+hashf(catKeyring.pub).slice(0, 8).toUpperCase()+' 127.0.0.1 ' + portWS1 'WS2P 11111111 127.0.0.1 ' + portWS1
]) ])
await s2.writePeer(p1) await s2.writePeer(p1)
await (s1._server.ws2pCluster as WS2PCluster).startCrawling(true) await (s1._server.ws2pCluster as WS2PCluster).startCrawling(true)
...@@ -209,7 +208,7 @@ describe("WS2P server limitations", function() { ...@@ -209,7 +208,7 @@ describe("WS2P server limitations", function() {
// A server // A server
conf1.ws2p = { conf1.ws2p = {
upnp: false, upnp: false,
uuid: hashf(keyring.pub).slice(0, 8).toUpperCase(), uuid: '11111111',
host: '127.0.0.1', host: '127.0.0.1',
port: portWS, port: portWS,
remotehost: '127.0.0.1', remotehost: '127.0.0.1',
...@@ -217,7 +216,7 @@ describe("WS2P server limitations", function() { ...@@ -217,7 +216,7 @@ describe("WS2P server limitations", function() {
privilegedNodes: [] privilegedNodes: []
} }
const server = simpleTestingServer(conf1) const server = simpleTestingServer(conf1)
server._server.addEndpointsDefinitions(async () => 'WS2P '+conf1.ws2p.uuid+' 127.0.0.1 ' + portWS) server._server.addEndpointsDefinitions(async () => 'WS2P 11111111 127.0.0.1 ' + portWS)
return { server, portWS, portBMA } return { server, portWS, portBMA }
} }
}) })
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment