Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sharness): add extra check in flush=false in files write #8432

Merged
merged 1 commit into from
Sep 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions test/sharness/t0250-files-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,21 @@ test_files_api() {
verify_dir_contents /cats file1 ipfs this
'

# Temporary check to uncover source of flaky test fail (see
# https://github.com/ipfs/go-ipfs/issues/8131 for more details).
# We suspect that sometimes the daemon isn't running when in fact we need
# it to for the `--flush=false` flag to take effect. To try to spot the
# specific error before it manifests itself in the failed test we explicitly
# poll the damon API when it should be running ($WITH_DAEMON set).
# Test taken from `test/sharness/lib/test-lib.sh` (but with less retries
# as the daemon is either running or not but there is no 'bootstrap' time
# needed in this case).
test_expect_success "'ipfs daemon' is running when WITH_DAEMON is set" '
test -z "$WITH_DAEMON" ||
pollEndpoint -host=$API_MADDR -v -tout=1s -tries=3 2>poll_apierr > poll_apiout ||
test_fsh cat actual_daemon || test_fsh cat daemon_err || test_fsh cat poll_apierr || test_fsh cat poll_apiout
'

test_expect_success "write 'no-flush' succeeds $EXTRA" '
echo "testing" | ipfs files write $ARGS $RAW_LEAVES -f=false -e /cats/walrus
'
Expand Down