-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b381e29
commit 6a2da5e
Showing
3 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` | ||
}); | ||
}); |