File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
examples/js-libp2p-example-delegated-routing/test Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-console */
2
2
import { createDelegatedRoutingV1HttpApiServer } from '@helia/delegated-routing-v1-http-api-server'
3
3
import { peerIdFromString } from '@libp2p/peer-id'
4
- import { createHelia } from 'helia'
4
+ import { createHelia , libp2pDefaults } from 'helia'
5
5
import { setup , expect } from 'test-ipfs-example/browser'
6
6
7
7
// Setup
@@ -18,6 +18,13 @@ let url
18
18
19
19
// start a libp2p node to delegate to
20
20
async function spawnServer ( ) {
21
+ const libp2p = libp2pDefaults ( )
22
+
23
+ if ( process . env . CI != null ) {
24
+ // do not use UPnP service in CI
25
+ delete libp2p . services . upnp
26
+ }
27
+
21
28
const helia = await createHelia ( {
22
29
routers : [ {
23
30
// dummy router that always finds providers
@@ -34,7 +41,8 @@ async function spawnServer () {
34
41
multiaddrs : [ ]
35
42
}
36
43
}
37
- } ]
44
+ } ] ,
45
+ libp2p
38
46
} )
39
47
const fastify = await createDelegatedRoutingV1HttpApiServer ( helia , {
40
48
listen : {
You can’t perform that action at this time.
0 commit comments