|
1 | 1 | import { expect } from 'aegir/chai'
|
2 | 2 | import { keys } from './resources/keys/index.js'
|
3 |
| -import type { Daemon, NodeType, SpawnOptions, DaemonFactory, PeerIdType } from './index.js' |
| 3 | +import type { Daemon, NodeType, SpawnOptions, DaemonFactory, PeerIdType, Encryption } from './index.js' |
4 | 4 |
|
5 | 5 | export function connectTests (factory: DaemonFactory): void {
|
6 | 6 | const keyTypes: PeerIdType[] = ['ed25519', 'rsa', 'secp256k1']
|
7 | 7 | const impls: NodeType[] = ['js', 'go']
|
| 8 | + const encrypters: Encryption[] = ['noise', 'tls'] |
8 | 9 |
|
9 | 10 | for (const keyType of keyTypes) {
|
10 | 11 | for (const implA of impls) {
|
11 | 12 | for (const implB of impls) {
|
12 |
| - runConnectTests( |
13 |
| - `noise/${keyType}`, |
14 |
| - factory, |
15 |
| - { type: implA, noise: true, key: keys.go[keyType] }, |
16 |
| - { type: implB, noise: true, key: keys.js[keyType] } |
17 |
| - ) |
| 13 | + for (const encrypter of encrypters) { |
| 14 | + runConnectTests( |
| 15 | + `${encrypter}/${keyType}`, |
| 16 | + factory, |
| 17 | + { type: implA, encryption: encrypter, key: keys.go[keyType] }, |
| 18 | + { type: implB, encryption: encrypter, key: keys.js[keyType] } |
| 19 | + ) |
| 20 | + } |
18 | 21 | }
|
19 | 22 | }
|
20 | 23 | }
|
|
0 commit comments