diff --git a/package.json b/package.json index e0fae49dc44..c9402ad996d 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,9 @@ "version": "0.1.4" }, { - "hash": "QmV1DPm5F46LvQMxCVPhu35zHgZEeMvyVtpxjb5TwfGiua", + "hash": "QmckeQ2zrYLAXoSHYTGn5BDdb22BqbUoHEHm8KZ9YWRxd1", "name": "iptb", - "version": "1.3.19" + "version": "2.0.0" }, { "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8", @@ -586,6 +586,12 @@ "hash": "QmY4dowpPFCBsbaoaJc9mNWso64eDJsm32LJznwPNaAiJG", "name": "go-libp2p-pubsub", "version": "0.11.3" + }, + { + "author": "travisperson", + "hash": "QmX51YXMSkZWJ6fQFP8ieQvwTbmLFK1YbGHqeJwgLvjkZU", + "name": "iptb-plugins", + "version": "1.0.0" } ], "gxVersion": "0.10.0", diff --git a/test/bin/Rules.mk b/test/bin/Rules.mk index 7d0bc3f8e0a..7896d353da2 100644 --- a/test/bin/Rules.mk +++ b/test/bin/Rules.mk @@ -14,6 +14,10 @@ $(d)/go-timeout: test/dependencies/go-timeout $(go-build) TGTS_$(d) += $(d)/go-timeout +$(d)/iptb: test/dependencies/iptb + $(go-build) +TGTS_$(d) += $(d)/iptb + $(d)/ma-pipe-unidir: test/dependencies/ma-pipe-unidir $(go-build) TGTS_$(d) += $(d)/ma-pipe-unidir @@ -22,7 +26,7 @@ $(d)/json-to-junit: test/dependencies/json-to-junit $(go-build) TGTS_$(d) += $(d)/json-to-junit -TGTS_GX_$(d) := hang-fds iptb +TGTS_GX_$(d) := hang-fds TGTS_GX_$(d) := $(addprefix $(d)/,$(TGTS_GX_$(d))) $(TGTS_GX_$(d)): diff --git a/test/dependencies/iptb/iptb.go b/test/dependencies/iptb/iptb.go new file mode 100644 index 00000000000..94f1b44c85b --- /dev/null +++ b/test/dependencies/iptb/iptb.go @@ -0,0 +1,34 @@ +package main + +import ( + "fmt" + "os" + + cli "gx/ipfs/QmckeQ2zrYLAXoSHYTGn5BDdb22BqbUoHEHm8KZ9YWRxd1/iptb/cli" + testbed "gx/ipfs/QmckeQ2zrYLAXoSHYTGn5BDdb22BqbUoHEHm8KZ9YWRxd1/iptb/testbed" + + plugin "gx/ipfs/QmX51YXMSkZWJ6fQFP8ieQvwTbmLFK1YbGHqeJwgLvjkZU/iptb-plugins/local" +) + +func init() { + _, err := testbed.RegisterPlugin(testbed.IptbPlugin{ + From: "", + NewNode: plugin.NewNode, + GetAttrList: plugin.GetAttrList, + GetAttrDesc: plugin.GetAttrDesc, + PluginName: plugin.PluginName, + BuiltIn: true, + }, false) + + if err != nil { + panic(err) + } +} + +func main() { + cli := cli.NewCli() + if err := cli.Run(os.Args); err != nil { + fmt.Fprintf(cli.ErrWriter, "%s\n", err) + os.Exit(1) + } +} diff --git a/test/sharness/lib/iptb-lib.sh b/test/sharness/lib/iptb-lib.sh index e9699ea3eb4..6ee8fbd8b01 100644 --- a/test/sharness/lib/iptb-lib.sh +++ b/test/sharness/lib/iptb-lib.sh @@ -8,7 +8,7 @@ export IPTB_ROOT="$(pwd)/.iptb" ipfsi() { dir="$1" shift - IPFS_PATH="$IPTB_ROOT/$dir" ipfs "$@" + IPFS_PATH="$IPTB_ROOT/testbeds/default/$dir" ipfs "$@" } check_has_connection() { @@ -21,7 +21,7 @@ iptb() { if ! command iptb "$@"; then case "$1" in start|stop|connect) - test_fsh command iptb logs '*' + test_fsh command iptb logs ;; esac return 1 @@ -36,11 +36,11 @@ startup_cluster() { if test -n "$other_args"; then test_expect_success "start up nodes with additional args" " - iptb start --args \"${other_args[@]}\" + iptb start -wait -- ${other_args[@]} " else test_expect_success "start up nodes" ' - iptb start + iptb start -wait ' fi @@ -58,7 +58,7 @@ startup_cluster() { } iptb_wait_stop() { - while ! iptb for-each sh -c '! { test -e "$IPFS_PATH/repo.lock" && fuser -f "$IPFS_PATH/repo.lock" >/dev/null; }'; do + while ! iptb run -- sh -c '! { test -e "$IPFS_PATH/repo.lock" && fuser -f "$IPFS_PATH/repo.lock" >/dev/null; }'; do go-sleep 10ms done } diff --git a/test/sharness/t0030-mount.sh b/test/sharness/t0030-mount.sh index 5276f9e7764..9f17f478bff 100755 --- a/test/sharness/t0030-mount.sh +++ b/test/sharness/t0030-mount.sh @@ -18,7 +18,7 @@ fi # start iptb + wait for peering NUM_NODES=5 test_expect_success 'init iptb' ' - iptb init -n $NUM_NODES --bootstrap=none --port=0 + iptb testbed create -type localipfs -count $NUM_NODES -init ' startup_cluster $NUM_NODES diff --git a/test/sharness/t0031-mount-publish.sh b/test/sharness/t0031-mount-publish.sh index d7a3162a5de..c37c1161dd1 100755 --- a/test/sharness/t0031-mount-publish.sh +++ b/test/sharness/t0031-mount-publish.sh @@ -17,7 +17,7 @@ test_init_ipfs # start iptb + wait for peering NUM_NODES=3 test_expect_success 'init iptb' ' - iptb init -n $NUM_NODES -f --bootstrap=none --port=0 && + iptb testbed create -type localipfs -count $NUM_NODES -force -init && startup_cluster $NUM_NODES ' diff --git a/test/sharness/t0041-ping.sh b/test/sharness/t0041-ping.sh index bf5cf2ca33a..268e7e68b16 100755 --- a/test/sharness/t0041-ping.sh +++ b/test/sharness/t0041-ping.sh @@ -10,14 +10,14 @@ BAD_PEER="QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJx" # start iptb + wait for peering test_expect_success 'init iptb' ' - iptb init -n 2 --bootstrap=none --port=0 + iptb testbed create -type localipfs -count 2 -init ' startup_cluster 2 test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) && - PEERID_1=$(iptb get id 1) + PEERID_0=$(iptb attr get 0 id) && + PEERID_1=$(iptb attr get 1 id) ' test_expect_success "test ping other" ' diff --git a/test/sharness/t0101-iptb-name.sh b/test/sharness/t0101-iptb-name.sh index 1fafe031eef..303704a3601 100755 --- a/test/sharness/t0101-iptb-name.sh +++ b/test/sharness/t0101-iptb-name.sh @@ -11,7 +11,7 @@ test_description="Test ipfs repo operations" num_nodes=4 test_expect_success "set up an iptb cluster" ' - iptb init -n $num_nodes -p 0 -f --bootstrap=none + iptb testbed create -type localipfs -count $num_nodes -force -init ' startup_cluster $num_nodes @@ -26,12 +26,12 @@ test_expect_success "publish that object as an ipns entry" ' ' test_expect_success "add an entry on another node pointing to that one" ' - NODE1_ID=$(iptb get id 1) && + NODE1_ID=$(iptb attr get 1 id) && ipfsi 2 name publish /ipns/$NODE1_ID ' test_expect_success "cat that entry on a third node" ' - NODE2_ID=$(iptb get id 2) && + NODE2_ID=$(iptb attr get 2 id) && ipfsi 3 cat /ipns/$NODE2_ID > output ' diff --git a/test/sharness/t0121-bootstrap-iptb.sh b/test/sharness/t0121-bootstrap-iptb.sh index 2bf15a7f923..e7c7d0105b6 100755 --- a/test/sharness/t0121-bootstrap-iptb.sh +++ b/test/sharness/t0121-bootstrap-iptb.sh @@ -18,11 +18,11 @@ test_expect_success "disable mdns" ' test_launch_ipfs_daemon test_expect_success "setup iptb nodes" ' - iptb init -n 5 -f --bootstrap=none --port=0 + iptb testbed create -type localipfs -count 5 -force -init ' test_expect_success "start up iptb nodes" ' - iptb start + iptb start -wait ' test_expect_success "check peers works" ' @@ -38,11 +38,11 @@ betterwait() { } test_expect_success "bring down iptb nodes" ' - PID0=$(cat "$IPTB_ROOT/0/daemon.pid") && - PID1=$(cat "$IPTB_ROOT/1/daemon.pid") && - PID2=$(cat "$IPTB_ROOT/2/daemon.pid") && - PID3=$(cat "$IPTB_ROOT/3/daemon.pid") && - PID4=$(cat "$IPTB_ROOT/4/daemon.pid") && + PID0=$(cat "$IPTB_ROOT/benches/default/0/daemon.pid") && + PID1=$(cat "$IPTB_ROOT/benches/default/1/daemon.pid") && + PID2=$(cat "$IPTB_ROOT/benches/default/2/daemon.pid") && + PID3=$(cat "$IPTB_ROOT/benches/default/3/daemon.pid") && + PID4=$(cat "$IPTB_ROOT/benches/default/4/daemon.pid") && iptb stop && # TODO: add --wait flag to iptb stop betterwait $PID0 betterwait $PID1 @@ -53,7 +53,7 @@ test_expect_success "bring down iptb nodes" ' test_expect_success "reset iptb nodes" ' # the api doesnt seem to get cleaned up in sharness tests for some reason - iptb init -n 5 -f --bootstrap=none --port=0 + iptb testbed create -type localipfs -count 5 -force -init ' test_expect_success "set bootstrap addrs" ' @@ -67,7 +67,7 @@ test_expect_success "set bootstrap addrs" ' ' test_expect_success "start up iptb nodes" ' - iptb start --wait + iptb start -wait ' test_expect_success "check peers works" ' diff --git a/test/sharness/t0125-twonode.sh b/test/sharness/t0125-twonode.sh index b0032f8b16f..c70213ac770 100755 --- a/test/sharness/t0125-twonode.sh +++ b/test/sharness/t0125-twonode.sh @@ -86,7 +86,7 @@ run_advanced_test() { } test_expect_success "set up tcp testbed" ' - iptb init -n 2 -p 0 -f --bootstrap=none + iptb testbed create -type localipfs -count 2 -force -init ' # Enable quic but don't use it yet. diff --git a/test/sharness/t0130-multinode.sh b/test/sharness/t0130-multinode.sh index cf5b9044f3f..1c732db7a7b 100755 --- a/test/sharness/t0130-multinode.sh +++ b/test/sharness/t0130-multinode.sh @@ -80,12 +80,12 @@ run_advanced_test() { test_expect_success "shut down nodes" ' iptb stop && iptb_wait_stop || - test_fsh tail -n +1 .iptb/*/daemon.std* + test_fsh tail -n +1 .iptb/benches/default/*/daemon.std* ' } test_expect_success "set up /tcp testbed" ' - iptb init -n 5 -p 0 -f --bootstrap=none + iptb testbed create -type localipfs -count 5 -force -init ' # test multiplex muxer @@ -97,7 +97,7 @@ unset LIBP2P_MUX_PREFS run_advanced_test test_expect_success "set up /ws testbed" ' - iptb init -n 5 -ws -p 0 -f --bootstrap=none + iptb testbed create -type localipfs -count 5 -attr listentype,ws -force -init ' # test multiplex muxer diff --git a/test/sharness/t0131-multinode-client-routing.sh b/test/sharness/t0131-multinode-client-routing.sh index 857cd06acca..e96f230cd66 100755 --- a/test/sharness/t0131-multinode-client-routing.sh +++ b/test/sharness/t0131-multinode-client-routing.sh @@ -43,12 +43,12 @@ run_single_file_test() { NNODES=10 test_expect_success "set up testbed" ' - iptb init -n $NNODES -p 0 -f --bootstrap=none + iptb testbed create -type localipfs -count $NNODES -force -init ' test_expect_success "start up nodes" ' - iptb start [0-7] && - iptb start [8-9] --args="--routing=dhtclient" + iptb start -wait [0-7] && + iptb start -wait [8-9] -- --routing=dhtclient ' test_expect_success "connect up nodes" ' diff --git a/test/sharness/t0140-swarm.sh b/test/sharness/t0140-swarm.sh index 145b53fd92a..a5c1dadda7d 100755 --- a/test/sharness/t0140-swarm.sh +++ b/test/sharness/t0140-swarm.sh @@ -98,28 +98,28 @@ test_expect_success "Addresses.NoAnnounce with /ipcidr affects addresses" ' test_kill_ipfs_daemon test_expect_success "set up tcp testbed" ' - iptb init -n 2 -p 0 -f --bootstrap=none + iptb testbed create -type localipfs -count 2 -force -init ' startup_cluster 2 test_expect_success "disconnect work without specifying a transport address" ' [ $(ipfsi 0 swarm peers | wc -l) -eq 1 ] && - ipfsi 0 swarm disconnect "/ipfs/$(iptb get id 1)" && + ipfsi 0 swarm disconnect "/ipfs/$(iptb attr get 1 id)" && [ $(ipfsi 0 swarm peers | wc -l) -eq 0 ] ' test_expect_success "connect work without specifying a transport address" ' [ $(ipfsi 0 swarm peers | wc -l) -eq 0 ] && - ipfsi 0 swarm connect "/ipfs/$(iptb get id 1)" && + ipfsi 0 swarm connect "/ipfs/$(iptb attr get 1 id)" && [ $(ipfsi 0 swarm peers | wc -l) -eq 1 ] ' test_expect_success "/p2p addresses work" ' [ $(ipfsi 0 swarm peers | wc -l) -eq 1 ] && - ipfsi 0 swarm disconnect "/p2p/$(iptb get id 1)" && + ipfsi 0 swarm disconnect "/p2p/$(iptb attr get 1 id)" && [ $(ipfsi 0 swarm peers | wc -l) -eq 0 ] && - ipfsi 0 swarm connect "/p2p/$(iptb get id 1)" && + ipfsi 0 swarm connect "/p2p/$(iptb attr get 1 id)" && [ $(ipfsi 0 swarm peers | wc -l) -eq 1 ] ' diff --git a/test/sharness/t0170-dht.sh b/test/sharness/t0170-dht.sh index c6f37f407e7..727bbccf2f6 100755 --- a/test/sharness/t0170-dht.sh +++ b/test/sharness/t0170-dht.sh @@ -12,14 +12,14 @@ test_dht() { test_expect_success 'init iptb' ' rm -rf .iptb/ && - iptb init -n $NUM_NODES --bootstrap=none --port=0 + iptb testbed create -type localipfs -count $NUM_NODES -init ' - startup_cluster $NUM_NODES "$@" + startup_cluster $NUM_NODES $@ test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) && - PEERID_2=$(iptb get id 2) + PEERID_0=$(iptb attr get 0 id) && + PEERID_2=$(iptb attr get 2 id) ' # ipfs dht findpeer @@ -70,7 +70,7 @@ test_dht() { # ipfs dht findprovs test_expect_success 'findprovs' ' ipfsi 4 dht findprovs $HASH > provs && - iptb get id 3 > expected && + iptb attr get 3 id > expected && test_cmp provs expected ' diff --git a/test/sharness/t0175-reprovider.sh b/test/sharness/t0175-reprovider.sh index fe8a4cbf48c..5f6c20b6761 100755 --- a/test/sharness/t0175-reprovider.sh +++ b/test/sharness/t0175-reprovider.sh @@ -8,12 +8,12 @@ NUM_NODES=6 init_strategy() { test_expect_success 'init iptb' ' - iptb init -f -n $NUM_NODES --bootstrap=none --port=0 + iptb testbed create -type localipfs -force -count $NUM_NODES -init ' test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) && - PEERID_1=$(iptb get id 1) + PEERID_0=$(iptb attr get 0 id) && + PEERID_1=$(iptb attr get 1 id) ' test_expect_success 'use pinning startegy for reprovider' ' @@ -123,12 +123,12 @@ test_expect_success 'stop peer 1' ' # Test reprovider working with ticking disabled test_expect_success 'init iptb' ' - iptb init -f -n $NUM_NODES --bootstrap=none --port=0 + iptb testbed create -type localipfs -force -count $NUM_NODES -init ' test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) && - PEERID_1=$(iptb get id 1) + PEERID_0=$(iptb attr get 0 id) && + PEERID_1=$(iptb attr get 1 id) ' test_expect_success 'Disable reprovider ticking' ' diff --git a/test/sharness/t0180-p2p.sh b/test/sharness/t0180-p2p.sh index 62587a42bba..31eb19afbf8 100755 --- a/test/sharness/t0180-p2p.sh +++ b/test/sharness/t0180-p2p.sh @@ -6,7 +6,7 @@ test_description="Test experimental p2p commands" # start iptb + wait for peering test_expect_success 'init iptb' ' - iptb init -n 3 --bootstrap=none --port=0 + iptb testbed create -type localipfs --count 3 --init ' test_expect_success 'generate test data' ' @@ -17,8 +17,8 @@ test_expect_success 'generate test data' ' startup_cluster 3 test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) && - PEERID_1=$(iptb get id 1) + PEERID_0=$(iptb attr get 0 id) && + PEERID_1=$(iptb attr get 1 id) ' check_test_ports() { test_expect_success "test ports are closed" ' diff --git a/test/sharness/t0180-pubsub-gossipsub.sh b/test/sharness/t0180-pubsub-gossipsub.sh index 9163339b248..c5ff8daf39e 100755 --- a/test/sharness/t0180-pubsub-gossipsub.sh +++ b/test/sharness/t0180-pubsub-gossipsub.sh @@ -7,7 +7,7 @@ test_description="Test pubsub with gossipsub" # start iptb + wait for peering NUM_NODES=5 test_expect_success 'init iptb' ' - iptb init -n $NUM_NODES --bootstrap=none --port=0 + iptb testbed create -type localipfs -count $NUM_NODES -init ' test_expect_success "enable gossipsub" ' @@ -20,8 +20,8 @@ test_expect_success "enable gossipsub" ' startup_cluster $NUM_NODES --enable-pubsub-experiment test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) && - PEERID_2=$(iptb get id 2) + PEERID_0=$(iptb attr get 0 id) && + PEERID_2=$(iptb attr get 2 id) ' test_expect_success 'pubsub' ' diff --git a/test/sharness/t0180-pubsub.sh b/test/sharness/t0180-pubsub.sh index bf3586bc9b0..9efdc4d1f90 100755 --- a/test/sharness/t0180-pubsub.sh +++ b/test/sharness/t0180-pubsub.sh @@ -7,13 +7,13 @@ test_description="Test dht command" # start iptb + wait for peering NUM_NODES=5 test_expect_success 'init iptb' ' - iptb init -n $NUM_NODES --bootstrap=none --port=0 + iptb testbed create -type localipfs -count $NUM_NODES -init ' run_pubsub_tests() { test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) && - PEERID_2=$(iptb get id 2) + PEERID_0=$(iptb attr get 0 id) && + PEERID_2=$(iptb attr get 2 id) ' # ipfs pubsub sub @@ -142,7 +142,7 @@ test_expect_success 're-enable signing on node 1' ' ' test_expect_success 'enable strict signature verification on all nodes' ' - iptb for-each ipfs config --json Pubsub.StrictSignatureVerification true + iptb run -- ipfs config --json Pubsub.StrictSignatureVerification true ' startup_cluster $NUM_NODES --enable-pubsub-experiment diff --git a/test/sharness/t0181-private-network.sh b/test/sharness/t0181-private-network.sh index fce66881374..6a0efd4c2ba 100755 --- a/test/sharness/t0181-private-network.sh +++ b/test/sharness/t0181-private-network.sh @@ -34,15 +34,15 @@ pnet_key > "${IPFS_PATH}/swarm.key" LIBP2P_FORCE_PNET=1 test_launch_ipfs_daemon test_expect_success "set up iptb testbed" ' - iptb init -n 5 -p 0 -f --bootstrap=none && - iptb for-each ipfs config --json Addresses.Swarm '"'"'["/ip4/127.0.0.1/tcp/0"]'"'"' + iptb testbed create -type localipfs -count 5 -force -init && + iptb run -- ipfs config --json Addresses.Swarm '"'"'["/ip4/127.0.0.1/tcp/0"]'"'"' ' set_key() { node="$1" keyfile="$2" - cp "$keyfile" "${IPTB_ROOT}/${node}/swarm.key" + cp "$keyfile" "${IPTB_ROOT}/testbeds/default/${node}/swarm.key" } pnet_key > key1 @@ -57,7 +57,7 @@ set_key 4 key2 unset LIBP2P_FORCE_PNET test_expect_success "start nodes" ' - iptb start [0-4] + iptb start -wait [0-4] ' test_expect_success "try connecting node in public network with priv networks" ' diff --git a/test/sharness/t0182-circuit-relay.sh b/test/sharness/t0182-circuit-relay.sh index 4f48827a3ec..4f480ebef64 100755 --- a/test/sharness/t0182-circuit-relay.sh +++ b/test/sharness/t0182-circuit-relay.sh @@ -7,12 +7,12 @@ test_description="Test circuit relay" # start iptb + wait for peering NUM_NODES=3 test_expect_success 'init iptb' ' - iptb init -n $NUM_NODES --bootstrap=none --port=0 + iptb testbed create -type localipfs -count $NUM_NODES -init ' # Network toplogy: A <-> Relay <-> B test_expect_success 'start up nodes for configuration' ' - iptb start --args --routing=none + iptb start -wait -- --routing=none ' test_expect_success 'configure EnableRelayHop in relay node' ' @@ -22,7 +22,7 @@ test_expect_success 'configure EnableRelayHop in relay node' ' test_expect_success 'restart nodes' ' iptb stop && iptb_wait_stop && - iptb start --args --routing=none + iptb start -wait -- --routing=none ' test_expect_success 'connect A <-> Relay' ' @@ -38,9 +38,9 @@ test_expect_success 'wait until relay is ready to do work' ' ' test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) && - PEERID_1=$(iptb get id 1) && - PEERID_2=$(iptb get id 2) + PEERID_0=$(iptb attr get 0 id) && + PEERID_1=$(iptb attr get 1 id) && + PEERID_2=$(iptb attr get 2 id) ' test_expect_success 'connect A <-Relay-> B' ' diff --git a/test/sharness/t0183-namesys-pubsub.sh b/test/sharness/t0183-namesys-pubsub.sh index 467c9c1e9a0..b4bbbc8413c 100755 --- a/test/sharness/t0183-namesys-pubsub.sh +++ b/test/sharness/t0183-namesys-pubsub.sh @@ -7,13 +7,13 @@ test_description="Test IPNS pubsub" # start iptb + wait for peering NUM_NODES=5 test_expect_success 'init iptb' ' - iptb init -n $NUM_NODES --bootstrap=none --port=0 + iptb testbed create -type localipfs -count $NUM_NODES -init ' startup_cluster $NUM_NODES --enable-namesys-pubsub test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) + PEERID_0=$(iptb attr get 0 id) ' test_expect_success 'check namesys pubsub state' ' diff --git a/test/sharness/t0190-quic-ping.sh b/test/sharness/t0190-quic-ping.sh index ed2eb5e9990..c16b23471f1 100755 --- a/test/sharness/t0190-quic-ping.sh +++ b/test/sharness/t0190-quic-ping.sh @@ -8,7 +8,7 @@ test_init_ipfs # start iptb + wait for peering test_expect_success 'init iptb' ' - iptb init -n 2 --bootstrap=none --port=0 + iptb testbed create -type localipfs -count 2 -init ' test_expect_success "enable QUIC experiment" ' @@ -26,8 +26,8 @@ test_expect_success "add QUIC swarm addresses" ' startup_cluster 2 test_expect_success 'peer ids' ' - PEERID_0=$(iptb get id 0) && - PEERID_1=$(iptb get id 1) + PEERID_0=$(iptb attr get 0 id) && + PEERID_1=$(iptb attr get 1 id) ' test_expect_success "test ping other" ' diff --git a/test/sharness/t0240-republisher.sh b/test/sharness/t0240-republisher.sh index 40b0b726fa6..42f63870fb7 100755 --- a/test/sharness/t0240-republisher.sh +++ b/test/sharness/t0240-republisher.sh @@ -15,7 +15,7 @@ setup_iptb() { bound=$(expr "$num_nodes" - 1) test_expect_success "iptb init" ' - iptb init -n $num_nodes --bootstrap none --port 0 + iptb testbed create -type localipfs -count $num_nodes -init ' for i in $(test_seq 0 "$bound") @@ -31,7 +31,7 @@ setup_iptb() { teardown_iptb() { test_expect_success "shut down nodes" ' - iptb kill + iptb stop ' } diff --git a/test/sharness/t0276-cidv0v1.sh b/test/sharness/t0276-cidv0v1.sh index d0b33f077d1..b1e437a4308 100755 --- a/test/sharness/t0276-cidv0v1.sh +++ b/test/sharness/t0276-cidv0v1.sh @@ -95,30 +95,31 @@ test_expect_success "check that we can access the file when converted to CIDv1" # test_expect_success "set up iptb testbed" ' - iptb init -n 2 -p 0 -f --bootstrap=none + iptb testbed create -type localipfs -count 2 -init ' test_expect_success "start nodes" ' - iptb start && + iptb start -wait && iptb connect 0 1 ' test_expect_success "add afile using CIDv0 to node 0" ' - iptb run 0 ipfs add -q --cid-version=0 afile + iptb run 0 -- ipfs add -q --cid-version=0 afile ' test_expect_success "get afile using CIDv1 via node 1" ' - iptb run 1 ipfs --timeout=2s cat $AHASHv1 > thefile && + iptb -quiet run 1 -- ipfs --timeout=2s cat $AHASHv1 > thefile && test_cmp afile thefile ' test_expect_success "add bfile using CIDv1 to node 0" ' - BHASHv1=$(iptb run 0 ipfs add -q --cid-version=1 --raw-leaves=false bfile) + BHASHv1=$(iptb -quiet run 0 -- ipfs add -q --cid-version=1 --raw-leaves=false bfile) ' test_expect_success "get bfile using CIDv0 via node 1" ' BHASHv0=$(cid-fmt -v 0 %s $BHASHv1) - iptb run 1 ipfs --timeout=2s cat $BHASHv0 > thefile && + echo $BHASHv1 && + iptb -quiet run 1 -- ipfs --timeout=2s cat $BHASHv0 > thefile && test_cmp bfile thefile '