Skip to content

http: factor single-file List helper and add t.Helper() to test helpers#9422

Open
eghuro wants to merge 2 commits into
rclone:masterfrom
eghuro:fix/http-test-helpers
Open

http: factor single-file List helper and add t.Helper() to test helpers#9422
eghuro wants to merge 2 commits into
rclone:masterfrom
eghuro:fix/http-test-helpers

Conversation

@eghuro

@eghuro eghuro commented May 12, 2026

Copy link
Copy Markdown

What is the purpose of this change?

TestIsAFileSubDir didn't assert the ErrDirNotFound branch for non-root List() in single-file mode, so the new behaviour was asymmetrically covered. Factor an assertSingleFileList helper that both TestIsAFileRoot and TestIsAFileSubDir use, and add t.Helper() to the existing prepare/prepareServer/testListRoot fixtures so failures report at the call site.

Was the change discussed in an issue or in the forum before?

No

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

eghuro added 2 commits May 12, 2026 02:08
TestIsAFileSubDir didn't assert the ErrDirNotFound branch for non-root
List() in single-file mode, so the new behaviour was asymmetrically
covered. Factor an assertSingleFileList helper that both
TestIsAFileRoot and TestIsAFileSubDir use, and add t.Helper() to the
existing prepare/prepareServer/testListRoot fixtures so failures
report at the call site.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant