Skip to content

Commit

Permalink
chore: move interop tests into integration test package (#2284)
Browse files Browse the repository at this point in the history
To reduce libp2p deps, move interop tests into integration tests
  • Loading branch information
achingbrain authored Dec 1, 2023
1 parent e7167fe commit 9197f10
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
11 changes: 11 additions & 0 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,27 @@
"test:firefox": "aegir test -t browser -- --browser firefox",
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
"test:node": "aegir test -t node --cov",
"test:interop": "aegir test -t node -f dist/test/interop.js",
"dep-check": "aegir dep-check"
},
"devDependencies": {
"@chainsafe/libp2p-gossipsub": "^10.0.0",
"@chainsafe/libp2p-noise": "^14.0.0",
"@chainsafe/libp2p-yamux": "^6.0.1",
"@libp2p/circuit-relay-v2": "^1.0.0",
"@libp2p/crypto": "^3.0.1",
"@libp2p/daemon-client": "^8.0.0",
"@libp2p/daemon-server": "^7.0.0",
"@libp2p/dcutr": "^1.0.0",
"@libp2p/fetch": "^1.0.0",
"@libp2p/floodsub": "^8.0.16",
"@libp2p/identify": "^1.0.0",
"@libp2p/interface": "^1.0.0",
"@libp2p/interface-compliance-tests": "^5.0.0",
"@libp2p/interface-internal": "^0.1.9",
"@libp2p/interop": "^10.0.0",
"@libp2p/kad-dht": "^11.0.2",
"@libp2p/logger": "^4.0.1",
"@libp2p/mplex": "^10.0.0",
"@libp2p/peer-id": "^4.0.0",
"@libp2p/peer-id-factory": "^3.0.8",
Expand All @@ -53,6 +62,8 @@
"@multiformats/multiaddr": "^12.1.10",
"aegir": "^41.0.2",
"delay": "^6.0.0",
"execa": "^8.0.1",
"go-libp2p": "^1.1.1",
"it-all": "^3.0.3",
"it-pipe": "^3.0.1",
"libp2p": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { tcp } from '@libp2p/tcp'
import { multiaddr } from '@multiformats/multiaddr'
import { execa } from 'execa'
import { path as p2pd } from 'go-libp2p'
import { createLibp2p, type Libp2pOptions, type ServiceFactoryMap } from 'libp2p'
import pDefer from 'p-defer'
import { createLibp2p, type Libp2pOptions, type ServiceFactoryMap } from '../src/index.js'
import type { ServiceMap, PeerId } from '@libp2p/interface'
import type { SpawnOptions, Daemon, DaemonFactory } from '@libp2p/interop'

Expand Down
4 changes: 1 addition & 3 deletions packages/libp2p/.aegir.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { pipe } from 'it-pipe'

/** @type {import('aegir').PartialOptions} */
export default {
build: {
Expand All @@ -18,7 +16,7 @@ export default {
const { plaintext } = await import('@libp2p/plaintext')
const { circuitRelayServer, circuitRelayTransport } = await import('@libp2p/circuit-relay-v2')
const { identify } = await import('@libp2p/identify')
const { echo, ECHO_PROTOCOL } = await import('./dist/test/fixtures/echo-service.js')
const { echo } = await import('./dist/test/fixtures/echo-service.js')

const peerId = await createEd25519PeerId()
const libp2p = await createLibp2p({
Expand Down
10 changes: 1 addition & 9 deletions packages/libp2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@
"test:chrome-webworker": "aegir test -t webworker -f \"./dist/test/**/*.spec.js\"",
"test:firefox": "aegir test -t browser -f \"./dist/test/**/*.spec.js\" -- --browser firefox",
"test:firefox-webworker": "aegir test -t webworker -f \"./dist/test/**/*.spec.js\" -- --browser firefox",
"test:webkit": "aegir test -t browser -f \"./dist/test/**/*.spec.js\" -- --browser webkit",
"test:interop": "aegir test -t node -f dist/test/interop.js"
"test:webkit": "aegir test -t browser -f \"./dist/test/**/*.spec.js\" -- --browser webkit"
},
"dependencies": {
"@libp2p/crypto": "^3.0.1",
Expand Down Expand Up @@ -120,26 +119,19 @@
"uint8arrays": "^4.0.6"
},
"devDependencies": {
"@chainsafe/libp2p-gossipsub": "^10.0.0",
"@chainsafe/libp2p-noise": "^14.0.0",
"@chainsafe/libp2p-yamux": "^6.0.1",
"@libp2p/bootstrap": "^10.0.2",
"@libp2p/circuit-relay-v2": "^1.0.2",
"@libp2p/daemon-client": "^8.0.0",
"@libp2p/daemon-server": "^7.0.0",
"@libp2p/floodsub": "^8.0.16",
"@libp2p/identify": "^1.0.1",
"@libp2p/interface-compliance-tests": "^5.0.2",
"@libp2p/interop": "^10.0.0",
"@libp2p/kad-dht": "^11.0.2",
"@libp2p/mdns": "^10.0.2",
"@libp2p/mplex": "^10.0.2",
"@libp2p/plaintext": "^1.0.2",
"@libp2p/tcp": "^9.0.2",
"@libp2p/websockets": "^8.0.2",
"aegir": "^41.0.2",
"execa": "^8.0.1",
"go-libp2p": "^1.1.1",
"it-pushable": "^3.2.1",
"p-event": "^6.0.0",
"p-times": "^4.0.0",
Expand Down

0 comments on commit 9197f10

Please sign in to comment.