Skip to content

Commit

Permalink
explicitly set repin interval in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
petar committed Dec 4, 2020
1 parent 67c1d74 commit 9864c13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/sharness/t0700-remotepin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fi
# daemon running in online mode to ensure Pin.origins/PinStatus.delegates work
test_init_ipfs
test_launch_ipfs_daemon
ipfs log level all info

# create user on pinning service
TEST_PIN_SVC="http://${DOCKER_HOST}:5000/api/v1"
Expand All @@ -27,7 +28,9 @@ test_expect_success "creating test user on remote pinning service" '
ipfs pin remote service add test_invalid_key_svc ${TEST_PIN_SVC} fake_api_key &&
ipfs pin remote service add test_invalid_url_path_svc ${TEST_PIN_SVC}/invalid-path fake_api_key &&
ipfs pin remote service add test_invalid_url_dns_svc https://invalid-service.example.com fake_api_key &&
ipfs pin remote service add --policy=mfs test_pin_mfs_svc ${TEST_PIN_SVC} ${TEST_PIN_SVC_KEY}
ipfs pin remote service add --policy=mfs test_pin_mfs_svc ${TEST_PIN_SVC} ${TEST_PIN_SVC_KEY} &&
ipfs config Pinning.MFSRepinInterval "10s" &&
echo Pinning.MFSRepinInterval=$(ipfs config Pinning.MFSRepinInterval)
'

test_expect_success "test 'ipfs pin remote service ls'" '
Expand All @@ -39,7 +42,7 @@ test_expect_success "test 'ipfs pin remote service ls'" '
'

test_expect_success "test mfs is being pinned" '
sleep 60 &&
sleep 10 &&
ipfs files stat / --enc=json | jq -r .Hash > mfs_cid &&
ipfs pin remote ls --service=test_pin_mfs_svc --name=policy-mfs --enc=json | jq -r .Cid > pin_cid &&
cat mfs_cid pin_cid &&
Expand Down

0 comments on commit 9864c13

Please sign in to comment.