You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/10/26 17:23:52 UTC
(opendal-yinyang) branch xuanwo/managed-sync-acceptance updated: test: tighten managed sync path assertions
This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch xuanwo/managed-sync-acceptance
in repository https://gitbox.apache.org/repos/asf/opendal-yinyang.git
The following commit(s) were added to refs/heads/xuanwo/managed-sync-acceptance by this push:
new d5985d0 test: tighten managed sync path assertions
d5985d0 is described below
commit d5985d0bfa6fb076f5783bba649a6516d62d1105
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Tue Oct 27 01:23:45 2026 +0800
test: tighten managed sync path assertions
Co-authored-by: Chojan Shang <ps...@apache.org>
---
specs/managed-sync-acceptance.md | 10 ++++++----
tests/linux_sync/acceptance.rs | 23 +++++++++++++++++++++++
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/specs/managed-sync-acceptance.md b/specs/managed-sync-acceptance.md
index f326136..cf74b36 100644
--- a/specs/managed-sync-acceptance.md
+++ b/specs/managed-sync-acceptance.md
@@ -41,10 +41,12 @@ Both publication authorities run the behavior-sensitive scenarios:
| Invalid local input | Symlinks, unsupported special files and a missing local root fail with an explicit diagnostic and do not mutate remote state. |
| Process boundary | Commands are distinct child processes. After each exits, the state lease is released and a fresh process can reopen the same state. |
-`yy status` must expose accepted, pending, remotely completed, failed,
-conflicted and uncertain states through a stable machine-readable form used by
-the suite. Conflict export must preserve exact bytes. Tests must not infer
-completion from local fsync or from a newer remote revision.
+`yy --volume CONFIG sync status --json` must expose accepted, pending, remotely
+completed, failed, conflicted and uncertain states through a stable
+machine-readable form used by the suite. The existing object-mode `yy status`
+continues to report only the remote namespace. Conflict export must preserve
+exact bytes. Tests must not infer completion from local fsync or from a newer
+remote revision.
### Status schema v1
diff --git a/tests/linux_sync/acceptance.rs b/tests/linux_sync/acceptance.rs
index ff26218..9ccef14 100644
--- a/tests/linux_sync/acceptance.rs
+++ b/tests/linux_sync/acceptance.rs
@@ -232,6 +232,16 @@ fn managed_sync_content_conflicts_export_and_explicit_resolution_both_authoritie
let _ = fixture.sync_run(&right);
let status = fixture.sync_status(&right);
let conflict = status.conflict("shared.txt").clone();
+ assert_eq!(conflict.original_path.as_deref(), Some("shared.txt"));
+ assert_eq!(conflict.desired_path.as_deref(), Some("shared.txt"));
+ assert_eq!(
+ status.entry("shared.txt").original_path.as_deref(),
+ Some("shared.txt")
+ );
+ assert_eq!(
+ status.entry("shared.txt").desired_path.as_deref(),
+ Some("shared.txt")
+ );
assert_eq!(status.entry("shared.txt").state, EntryState::Conflict);
assert_eq!(
status.entry("shared.txt").outcome.state,
@@ -523,6 +533,11 @@ fn managed_sync_create_create_and_delete_edit_conflicts_both_authorities() {
let conflict = status.conflict("same.txt").clone();
assert_eq!(conflict.original_path, None);
assert_eq!(conflict.desired_path.as_deref(), Some("same.txt"));
+ assert_eq!(status.entry("same.txt").original_path, None);
+ assert_eq!(
+ status.entry("same.txt").desired_path.as_deref(),
+ Some("same.txt")
+ );
assert_eq!(conflict.local, ConflictSide::CurrentFile);
assert_eq!(conflict.remote, ConflictSide::CurrentFile);
let local = fixture.path("create-local");
@@ -550,6 +565,14 @@ fn managed_sync_create_create_and_delete_edit_conflicts_both_authorities() {
let conflict = status.conflict("victim.txt").clone();
assert_eq!(conflict.original_path.as_deref(), Some("victim.txt"));
assert_eq!(conflict.desired_path.as_deref(), Some("victim.txt"));
+ assert_eq!(
+ status.entry("victim.txt").original_path.as_deref(),
+ Some("victim.txt")
+ );
+ assert_eq!(
+ status.entry("victim.txt").desired_path.as_deref(),
+ Some("victim.txt")
+ );
assert_eq!(conflict.local, ConflictSide::CurrentFile);
assert_eq!(conflict.remote, ConflictSide::Deleted);
assert_eq!(