Skip to content

Commit

Permalink
removed stubs from #441
Browse files Browse the repository at this point in the history
  • Loading branch information
tegefaulkes committed Oct 27, 2022
1 parent b381e29 commit 6a2da5e
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tests/integration/testnet/testnetNAT.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import path from 'path';
import fs from 'fs';
// Import Logger, { LogLevel, StreamHandler } from '@matrixai/logger';

describe('testnet ping', () => {
// Const logger = new Logger('testnet ping test', LogLevel.WARN, [
// new StreamHandler(),
// ]);
let dataDir: string;
beforeEach(async () => {
dataDir = await fs.promises.mkdtemp(
path.join(globalThis.tmpDir, 'polykey-test-'),
);
});
afterEach(async () => {
await fs.promises.rm(dataDir, {
force: true,
recursive: true,
});
});
test.todo('EIM to testnet.polykey.io', async () => {
// Local agent behind EIM NAT can ping testnet.polykey.io
});
test.todo('EDM to testnet.polykey.io', async () => {
// Local agent behind EDM NAT can ping testnet.polykey.io
});
test.todo('DMZ to EIM via testnet.polykey.io', async () => {
// Local agent behind DMZ can ping local agent behind EIM NAT using seed
// node signaller (and can ping back)
});
test.todo('DMZ to EDM via testnet.polykey.io', async () => {
// Local agent behind DMZ cannot ping local agent behind EDM NAT using seed
// node signaller (but can using relay) (and can ping back)
});
test.todo('EIM to EIM via testnet.polykey.io', async () => {
// Local agent behind EIM can ping local agent behind EIM NAT using seed
// node signaller (and can ping back)
});
test.todo('EIM to EDM via testnet.polykey.io', async () => {
// Local agent behind EIM cannot ping local agent behind EDM NAT using seed
// node signaller (but can using relay) (and can ping back)
});
test.todo('EDM to EDM via testnet.polykey.io', async () => {
// Local agent behind EDM cannot ping local agent behind EDM NAT using seed
// node signaller (but can using relay) (and can ping back)
});
});
37 changes: 37 additions & 0 deletions tests/integration/testnet/testnetPing.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import path from 'path';
import fs from 'fs';
// Import Logger, { LogLevel, StreamHandler } from '@matrixai/logger';

describe('testnet ping', () => {
// Const logger = new Logger('testnet ping test', LogLevel.WARN, [
// new StreamHandler(),
// ]);
let dataDir: string;
beforeEach(async () => {
dataDir = await fs.promises.mkdtemp(
path.join(globalThis.tmpDir, 'polykey-test-'),
);
});
afterEach(async () => {
await fs.promises.rm(dataDir, {
force: true,
recursive: true,
});
});
test.todo('can ping testnet.polykey.io', async () => {
// After starting a local agent with the testnet as a seed node, this test
// should call `nodes ping` to ping the testnet
});
test.todo('can signal via testnet.polykey.io', async () => {
// This test should create two local agents, each adding the testnet as a
// seed node
// One agent should be able to ping the other without directly adding its
// details (using the testnet as a signaller)
});
test.todo('can fail to signal via testnet.polykey.io', async () => {
// This test should do the same as above, but the second agent should be
// offline
// The ping should fail but both the local agent and seed node should
// remain running
});
});
27 changes: 27 additions & 0 deletions tests/integration/testnet/testnetTrust.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import path from 'path';
import fs from 'fs';
// Import Logger, { LogLevel, StreamHandler } from '@matrixai/logger';

describe('testnet trust', () => {
// Const logger = new Logger('testnet trust test', LogLevel.WARN, [
// new StreamHandler(),
// ]);
let dataDir: string;
beforeEach(async () => {
dataDir = await fs.promises.mkdtemp(
path.join(globalThis.tmpDir, 'polykey-test-'),
);
});
afterEach(async () => {
await fs.promises.rm(dataDir, {
force: true,
recursive: true,
});
});
test.todo('can trust `testnet.polykey.io` seed node', async () => {
// After starting a local agent with the testnet as a seed node, this test
// should call `identities trust` to trust the testnet
//
// This trust establishment should be checked by running `identities list`
});
});

0 comments on commit 6a2da5e

Please sign in to comment.