private TestSpace prepareTestSpace(PrivateKey key) throws Exception { TestSpace testSpace = new TestSpace(); testSpace.nodes = new ArrayList<>(); for (int i = 0; i < 4; i++) testSpace.nodes.add(createMain("node" + (i + 1), false)); testSpace.node = testSpace.nodes.get(0); assertEquals("http://localhost:8080", testSpace.node.myInfo.internalUrlString()); assertEquals("http://localhost:8080", testSpace.node.myInfo.publicUrlString()); testSpace.myKey = key; testSpace.client = new Client(testSpace.myKey, testSpace.node.myInfo, null); testSpace.clients = new ArrayList(); for (int i = 0; i < 4; i++) testSpace.clients.add(new Client(testSpace.myKey, testSpace.nodes.get(i).myInfo, null)); return testSpace; }
private TestSpace prepareTestSpace(PrivateKey key) throws Exception { TestSpace testSpace = new TestSpace(); testSpace.nodes = new ArrayList<>(); for (int i = 0; i < 4; i++) testSpace.nodes.add(createMain("node" + (i + 1), "", false)); testSpace.node = testSpace.nodes.get(0); assertEquals("http://localhost:8080", testSpace.node.myInfo.internalUrlString()); assertEquals("http://localhost:8080", testSpace.node.myInfo.publicUrlString()); testSpace.myKey = key; testSpace.client = new Client(testSpace.myKey, testSpace.node.myInfo, null); testSpace.clients = new ArrayList(); for (int i = 0; i < 4; i++) testSpace.clients.add(new Client(testSpace.myKey, testSpace.nodes.get(i).myInfo, null)); for (Main m : testSpace.nodes) { while (m.node.isSanitating()) Thread.sleep(100); } return testSpace; }
public static void createLocalNetwork() throws Exception { for (int i = 0; i < 3; i++) localNodes.add(createMain("node" + (i + 1), false)); Main main = localNodes.get(0); assertEquals("http://localhost:8080", main.myInfo.internalUrlString()); assertEquals("http://localhost:8080", main.myInfo.publicUrlString()); assertEquals(main.cache, main.node.getCache()); }
mm.forEach(m -> m.config.setIsFreeRegistrationsAllowedFromYaml(true)); Main main = mm.get(0); assertEquals("http://localhost:8080", main.myInfo.internalUrlString()); assertEquals("http://localhost:8080", main.myInfo.publicUrlString()); PrivateKey myKey = new PrivateKey(Do.read("./src/test_contracts/keys/u_key.private.unikey"));
mm.add(createMain("node" + (i + 1), false)); Main main = mm.get(0); assertEquals("http://localhost:8080", main.myInfo.internalUrlString()); assertEquals("http://localhost:8080", main.myInfo.publicUrlString()); PrivateKey myKey = new PrivateKey(Do.read("./src/test_contracts/keys/u_key.private.unikey"));