Skip to content

test(acceptance): assert COPY and MOVE preserve the source mtime#2904

Open
michaelstingl wants to merge 1 commit into
opencloud-eu:mainfrom
michaelstingl:issue-2378-copy-move-mtime
Open

test(acceptance): assert COPY and MOVE preserve the source mtime#2904
michaelstingl wants to merge 1 commit into
opencloud-eu:mainfrom
michaelstingl:issue-2378-copy-move-mtime

Conversation

@michaelstingl

Copy link
Copy Markdown
Contributor

Description

Adds acceptance tests asserting that a WebDAV COPY and a WebDAV MOVE preserve the source file's mtime. No acceptance scenario currently checks the mtime after a copy or a move: mtime is well covered on the upload path (coreApiWebdavUploadTUS/uploadFileMtime.feature) but not on the server-side copy/move operations.

Two new feature files, built entirely from existing step definitions (no new step code):

  • tests/acceptance/features/coreApiWebdavCopyCreate/copyFileMtime.feature
  • tests/acceptance/features/coreApiWebdavMove/moveFileMtime.feature

Each uploads a file with a known mtime, copies/moves it (to a sibling name and into a folder), and asserts the destination keeps that mtime, across the old, new and spaces DAV paths.

Related Issue

Adds the missing regression coverage for the COPY mtime behavior reported in #2378, which was fixed on the reva side in:

The fix shipped without a regression test in this suite, which is why the issue surfaced only through rclone's external integration tests. This PR closes that test gap. The MOVE scenarios cover the same live-property guarantee for the sibling operation, which was also untested.

Motivation and Context

Per RFC 4918 section 9.8 a COPY duplicates the resource, so the live properties including getlastmodified carry over to the destination; the same expectation holds for a MOVE. The behavior is correct in current builds, but nothing in the acceptance suite guards it, so a regression could pass CI unnoticed.

How Has This Been Tested?

Ran both feature files locally against a stock opencloudeu/opencloud-rolling:7.1 server on all three CI storage drivers, via make test-acceptance-api:

  • decomposed, posix, and decomposeds3 (with MinIO)
  • 36 scenarios total, all passing (copy and move, each across old/new/spaces)

No expected-failures entries were needed on any driver.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes, just adding missing tests)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

🤖 drafted with Claude Code, reviewed before submitting.

No acceptance scenario checked the mtime after a WebDAV COPY or MOVE.
mtime is covered on the upload path
(coreApiWebdavUploadTUS/uploadFileMtime.feature) but not on the
server-side copy and move operations, which is why the COPY mtime bug in
opencloud-eu#2378 surfaced only through rclone's external integration tests.

Add copyFileMtime.feature and moveFileMtime.feature, built from existing
steps: upload a file with a known mtime, copy or move it (to a sibling
name and into a folder), then assert the destination keeps the mtime,
across the old, new and spaces DAV paths. The fix shipped in
opencloud-eu/reva#535; this adds the missing
regression coverage.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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