Unverified 提交 17e886e2 作者: Steven Allen 提交者: GitHub

Merge pull request #6768 from ipfs/chore/update

chore(dep): update libp2p
......@@ -144,8 +144,6 @@ jobs:
- *store_gomod
interop:
executor: node
environment:
IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
parallelism: 4
steps:
- *make_out_dirs
......@@ -170,6 +168,11 @@ jobs:
paths:
- ~/ipfs/go-ipfs/interop/node_modules
- run:
name: Installing js-ipfs
command: |
npm install ipfs ipfs-http-client
working_directory: ~/ipfs/go-ipfs/interop
- run:
name: Installing reporting tools
command: |
npm install --save-dev mocha-junit-reporter@1.23.1 mocha-multi-reporters@1.1.0
......@@ -185,6 +188,8 @@ jobs:
working_directory: ~/ipfs/go-ipfs/interop
environment:
IPFS_REUSEPORT: false
LIBP2P_ALLOW_WEAK_RSA_KEYS: true
IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
- store_test_results:
path: /tmp/test-results
go-ipfs-api:
......
......@@ -10,7 +10,6 @@ package main
import (
"context"
"errors"
"flag"
"fmt"
"io"
......@@ -113,8 +112,8 @@ func main() {
}
func setupPeer(a args) (peer.ID, pstore.Peerstore, error) {
if a.keybits < 2048 {
return "", nil, errors.New("bitsize less than 2048 is considered unsafe")
if a.keybits < ci.MinRsaKeyBits {
return "", nil, ci.ErrRsaKeyTooSmall
}
out("generating key pair...")
......
......@@ -56,6 +56,7 @@ func (api *PubSubAPI) Publish(ctx context.Context, topic string, data []byte) er
return err
}
//nolint deprecated
return api.pubSub.Publish(topic, data)
}
......@@ -70,6 +71,7 @@ func (api *PubSubAPI) Subscribe(ctx context.Context, topic string, opts ...caopt
return nil, err
}
//nolint deprecated
sub, err := api.pubSub.Subscribe(topic)
if err != nil {
return nil, err
......
......@@ -204,7 +204,8 @@ func main() {
fmt.Println("-- Getting an IPFS node running -- ")
ctx, _ := context.WithCancel(context.Background())
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
/*
// Spawn a node using the default path (~/.ipfs), assuming that a repo exists there already
......
......@@ -14,14 +14,14 @@ require (
github.com/gogo/protobuf v1.3.1
github.com/hashicorp/go-multierror v1.0.0
github.com/hashicorp/golang-lru v0.5.3
github.com/ipfs/go-bitswap v0.1.9
github.com/ipfs/go-bitswap v0.1.10
github.com/ipfs/go-block-format v0.0.2
github.com/ipfs/go-blockservice v0.1.2
github.com/ipfs/go-cid v0.0.3
github.com/ipfs/go-cidutil v0.0.2
github.com/ipfs/go-datastore v0.1.1
github.com/ipfs/go-detect-race v0.0.1
github.com/ipfs/go-ds-badger v0.0.5
github.com/ipfs/go-ds-badger v0.0.7
github.com/ipfs/go-ds-flatfs v0.1.0
github.com/ipfs/go-ds-leveldb v0.1.0
github.com/ipfs/go-ds-measure v0.0.2
......@@ -30,7 +30,7 @@ require (
github.com/ipfs/go-ipfs-blockstore v0.1.0
github.com/ipfs/go-ipfs-chunker v0.0.3
github.com/ipfs/go-ipfs-cmds v0.1.1
github.com/ipfs/go-ipfs-config v0.0.11
github.com/ipfs/go-ipfs-config v0.0.12
github.com/ipfs/go-ipfs-ds-help v0.0.1
github.com/ipfs/go-ipfs-exchange-interface v0.0.1
github.com/ipfs/go-ipfs-exchange-offline v0.0.1
......@@ -57,26 +57,26 @@ require (
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2
github.com/jbenet/goprocess v0.1.3
github.com/libp2p/go-libp2p v0.4.0
github.com/libp2p/go-libp2p v0.4.2
github.com/libp2p/go-libp2p-autonat-svc v0.1.0
github.com/libp2p/go-libp2p-circuit v0.1.3
github.com/libp2p/go-libp2p-circuit v0.1.4
github.com/libp2p/go-libp2p-connmgr v0.1.1
github.com/libp2p/go-libp2p-core v0.2.5
github.com/libp2p/go-libp2p-http v0.1.4
github.com/libp2p/go-libp2p-kad-dht v0.2.1
github.com/libp2p/go-libp2p-kad-dht v0.3.1
github.com/libp2p/go-libp2p-kbucket v0.2.1
github.com/libp2p/go-libp2p-loggables v0.1.0
github.com/libp2p/go-libp2p-mplex v0.2.1
github.com/libp2p/go-libp2p-peerstore v0.1.3
github.com/libp2p/go-libp2p-peerstore v0.1.4
github.com/libp2p/go-libp2p-pnet v0.1.0
github.com/libp2p/go-libp2p-pubsub v0.1.1
github.com/libp2p/go-libp2p-pubsub v0.2.4
github.com/libp2p/go-libp2p-pubsub-router v0.1.0
github.com/libp2p/go-libp2p-quic-transport v0.2.2
github.com/libp2p/go-libp2p-record v0.1.1
github.com/libp2p/go-libp2p-record v0.1.2
github.com/libp2p/go-libp2p-routing-helpers v0.1.0
github.com/libp2p/go-libp2p-secio v0.2.0
github.com/libp2p/go-libp2p-secio v0.2.1
github.com/libp2p/go-libp2p-swarm v0.2.2
github.com/libp2p/go-libp2p-testing v0.1.0
github.com/libp2p/go-libp2p-testing v0.1.1
github.com/libp2p/go-libp2p-tls v0.1.1
github.com/libp2p/go-libp2p-yamux v0.2.1
github.com/libp2p/go-maddr-filter v0.0.5
......@@ -85,10 +85,10 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/mr-tron/base58 v1.1.2
github.com/multiformats/go-multiaddr v0.1.2
github.com/multiformats/go-multiaddr-dns v0.1.0
github.com/multiformats/go-multiaddr-dns v0.2.0
github.com/multiformats/go-multiaddr-net v0.1.1
github.com/multiformats/go-multibase v0.0.1
github.com/multiformats/go-multihash v0.0.8
github.com/multiformats/go-multihash v0.0.9
github.com/opentracing/opentracing-go v1.1.0
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v1.1.0
......
......@@ -8,42 +8,38 @@ test_description="Test daemon command"
. lib/test-lib.sh
test_expect_success "test environment initialized" '
export ORIG_IPFS_PATH="$IPFS_PATH"
test_expect_success "create badger config" '
ipfs init --profile=badgerds,test > /dev/null &&
cp "$IPFS_PATH/config" init-config
'
export ORIG_PATH="$(pwd)/.ipfs"
export IPFS_PATH="$ORIG_PATH"
export CLONE_PATH="$(pwd)/.ipfs-clone"
ipfs init --profile=badgerds > /dev/null
test_expect_success "cleanup repo" '
rm -rf "$IPFS_PATH"
'
export IPFS_PATH=$CLONE_PATH
test_launch_ipfs_daemon --init --init-config="$ORIG_PATH/config"
test_launch_ipfs_daemon --init --init-config="$(pwd)/init-config" --init-profile=test
test_kill_ipfs_daemon
test_expect_success "daemon initialization with existing config works" '
ipfs config "Datastore.Spec.child.path" >actual &&
test $(cat actual) = "badgerds"
test $(cat actual) = "badgerds" &&
ipfs config Addresses > orig_addrs
'
test_expect_success "clean up daemon clone" '
rm -rf "$CLONE_PATH"
test_expect_success "cleanup repo" '
rm -rf "$IPFS_PATH"
'
test_launch_ipfs_daemon --init --init-config="$ORIG_PATH/config" --init-profile=randomports
test_launch_ipfs_daemon --init --init-config="$(pwd)/init-config" --init-profile=test,randomports
test_kill_ipfs_daemon
test_expect_failure "daemon initialization with existing config + profiles works" '
ipfs config Addresses >clone_conf &&
IPFS_PATH=$ORIG_PATH &&
ipfs config Addresses >orig_conf &&
test_cmp clone_conf orig_conf
test_expect_success "daemon initialization with existing config + profiles works" '
ipfs config Addresses >new_addrs &&
test_expect_code 1 diff -q new_addrs orig_addrs
'
test_expect_success "clean up test environment" '
rm -rf "$CLONE_PATH"
rm -rf "$ORIG_PATH"
export IPFS_PATH=$ORIG_IPFS_PATH
test_expect_success "cleanup repo" '
rm -rf "$IPFS_PATH"
'
test_init_ipfs
......
......@@ -10,6 +10,10 @@ test_expect_success 'init iptb' '
iptb testbed create -type localipfs -count $NUM_NODES -init
'
test_expect_success 'disable the DHT' '
iptb run -- ipfs config Routing.Type none
'
run_pubsub_tests() {
test_expect_success 'peer ids' '
PEERID_0=$(iptb attr get 0 id) &&
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论