Sharness fixes
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
This commit is contained in:
parent
229c4d148c
commit
8374ece8a8
|
@ -16,6 +16,7 @@ func (c *Cluster) ConnectGraph() (api.ConnectGraph, error) {
|
|||
defer span.End()
|
||||
|
||||
cg := api.ConnectGraph{
|
||||
ClusterID: c.host.ID(),
|
||||
IPFSLinks: make(map[string][]peer.ID),
|
||||
ClusterLinks: make(map[string][]peer.ID),
|
||||
ClustertoIPFS: make(map[string]peer.ID),
|
||||
|
|
|
@ -15,7 +15,7 @@ test_expect_success IPFS,CLUSTER "pin data to cluster with ctl" '
|
|||
'
|
||||
|
||||
test_expect_success IPFS,CLUSTER "unpin data from cluster with ctl" '
|
||||
cid=`ipfs-cluster-ctl --enc=json pin ls | jq -r ".[] | .cid" | head -1`
|
||||
cid=`ipfs-cluster-ctl --enc=json pin ls | jq -r ".[] | .cid | .[\"/\"]" | head -1`
|
||||
ipfs-cluster-ctl pin rm "$cid" &&
|
||||
!(ipfs-cluster-ctl pin ls "$cid" | grep -q "$cid") &&
|
||||
ipfs-cluster-ctl status "$cid" | grep -q -i "UNPINNED"
|
||||
|
@ -29,7 +29,7 @@ test_expect_success IPFS,CLUSTER "wait for data to pin to cluster with ctl" '
|
|||
'
|
||||
|
||||
test_expect_success IPFS,CLUSTER "wait for data to unpin from cluster with ctl" '
|
||||
cid=`ipfs-cluster-ctl --enc=json pin ls | jq -r ".[] | .cid" | head -1`
|
||||
cid=`ipfs-cluster-ctl --enc=json pin ls | jq -r ".[] | .cid | .[\"/\"]" | head -1`
|
||||
ipfs-cluster-ctl pin rm --wait "$cid" | grep -q -i "UNPINNED" &&
|
||||
!(ipfs-cluster-ctl pin ls "$cid" | grep -q "$cid") &&
|
||||
ipfs-cluster-ctl status "$cid" | grep -q -i "UNPINNED"
|
||||
|
@ -43,7 +43,7 @@ test_expect_success IPFS,CLUSTER "wait for data to pin to cluster with ctl with
|
|||
'
|
||||
|
||||
test_expect_success IPFS,CLUSTER "wait for data to unpin from cluster with ctl with timeout" '
|
||||
cid=`ipfs-cluster-ctl --enc=json pin ls | jq -r ".[] | .cid" | head -1`
|
||||
cid=`ipfs-cluster-ctl --enc=json pin ls | jq -r ".[] | .cid | .[\"/\"]" | head -1`
|
||||
ipfs-cluster-ctl pin rm --wait --wait-timeout 2s "$cid" | grep -q -i "UNPINNED" &&
|
||||
!(ipfs-cluster-ctl pin ls "$cid" | grep -q "$cid") &&
|
||||
ipfs-cluster-ctl status "$cid" | grep -q -i "UNPINNED"
|
||||
|
|
|
@ -24,7 +24,7 @@ test_expect_success IPFS,CLUSTER,JQ "state export saves the correct state to exp
|
|||
cluster_kill && sleep 5 &&
|
||||
ipfs-cluster-service --debug --config "test-config" state export -f export.json &&
|
||||
[ -f export.json ] &&
|
||||
jq ".[].cid" export.json | grep -q "$cid"
|
||||
jq -r ".[] | .cid | .[\"/\"]" export.json | grep -q "$cid"
|
||||
'
|
||||
|
||||
test_clean_ipfs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
{
|
||||
"cid": "QmbrCtydGyPeHiLURSPMqrvE5mCgMCwFYq3UD4XLCeAYw6",
|
||||
"cid": { "/": "QmbrCtydGyPeHiLURSPMqrvE5mCgMCwFYq3UD4XLCeAYw6"},
|
||||
"name": "",
|
||||
"allocations": [],
|
||||
"replication_factor_min": -1,
|
||||
|
|
Loading…
Reference in New Issue
Block a user