Skip to content

rclone: add automated tests using the memory backend#50

Merged
omar-polo merged 2 commits into
integration/rclonefrom
claude/rclone-generated-tests
Jul 3, 2026
Merged

rclone: add automated tests using the memory backend#50
omar-polo merged 2 commits into
integration/rclonefrom
claude/rclone-generated-tests

Conversation

@omar-polo

Copy link
Copy Markdown
Collaborator

Summary

  • Add rclone/connector_test.go with 16 tests covering the full connector surface
  • Use rclone's built-in memory backend for fully in-process testing (no network, no temp files, no fake FS overlay needed)
  • Tests are structured to mirror the WebDAV integration test pattern

Tests added

Metadata / connectivity

  • TestMetadata — verifies Type(), Origin(), Root()
  • TestPing — verifies Ping() succeeds on a non-empty backend

Importer

  • TestImport — walks a seeded tree, checks expected paths arrive on the records channel
  • TestImportFileContent — opens a record's Reader and verifies file content

Exporter

  • TestExport — creates a directory and a file, verifies the file lands in the rclone FS
  • TestExportSkipsXattr — xattr records are ack'd without writing to the FS
  • TestExportSkipsRoot — the / directory record is ack'd without calling Mkdir

Storage

  • TestStorageCreateOpen — round-trips the CONFIG blob
  • TestStorageCreateAlreadyExists — second Create returns an error
  • TestStoragePutGetRoundtrip — subtests for packfile, state, and lock resources
  • TestStoragePutGetRange — byte-range read returns the correct slice
  • TestStorageList — two objects appear after two Puts
  • TestStorageDelete — object disappears from List after Delete
  • TestStorageUnsupportedResource — all four storage methods return an error for an unknown resource
  • TestStorageMode — returns ModeRead|ModeWrite
  • TestStorageSize — returns -1

Generated by Claude Code

@omar-polo omar-polo changed the base branch from integration/rclone to op/rclone-rewrite June 24, 2026 20:07
@omar-polo omar-polo force-pushed the claude/rclone-generated-tests branch 2 times, most recently from e137e7d to 4956b9c Compare June 24, 2026 22:19
@omar-polo omar-polo marked this pull request as draft June 24, 2026 22:22
@omar-polo

Copy link
Copy Markdown
Collaborator Author

draft because i'd like to merge #47 before this goes in.

Base automatically changed from op/rclone-rewrite to integration/rclone July 3, 2026 13:33
@omar-polo omar-polo force-pushed the claude/rclone-generated-tests branch from e962a1b to 20fa00e Compare July 3, 2026 13:36
@omar-polo omar-polo marked this pull request as ready for review July 3, 2026 13:40
@omar-polo omar-polo merged commit 6a57a8b into integration/rclone Jul 3, 2026
2 checks passed
@omar-polo omar-polo deleted the claude/rclone-generated-tests branch July 3, 2026 13:40
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.

2 participants