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

Add failing reference test (MountPoint looses local state) #1220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
62 changes: 62 additions & 0 deletions mountpoint-s3/tests/reftests/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,9 +1305,10 @@
Op::UnlinkFile(DirectoryIndex(1), ChildIndex(0)),
],
0,
)

Check warning on line 1308 in mountpoint-s3/tests/reftests/harness.rs

View workflow job for this annotation

GitHub Actions / Formatting

Diff in /home/runner/work/mountpoint-s3/mountpoint-s3/mountpoint-s3/tests/reftests/harness.rs
}


/*
Ensure that local files are shadowed by the remote directories.
*/
Expand All @@ -1328,6 +1329,67 @@
),
],
0,
)

Check warning on line 1332 in mountpoint-s3/tests/reftests/harness.rs

View workflow job for this annotation

GitHub Actions / Formatting

Diff in /home/runner/work/mountpoint-s3/mountpoint-s3/mountpoint-s3/tests/reftests/harness.rs
}


#[test]
fn regression_local_lost_when_removing_remote_entries() {
run_test(TreeNode::Directory(BTreeMap::from([])), vec![
Op::CreateDirectory(
DirectoryIndex(
0,
),
ValidName(
"a".into(),
),
),
Op::CreateDirectory(
DirectoryIndex(
0,
),
ValidName(
"-".into(),
),
),
Op::WriteFile(
ValidName(
"a".into(),
),
DirectoryIndex(
1,
),
FileContent(
0,
FileSize::Small(0),
),
),
Op::CreateFile(
ValidName(
"aa".into(),
),
DirectoryIndex(
1,
),
FileContent(
0,
FileSize::Small(0),
),
),
Op::DeleteObject(
KeyIndex(
0,
),
),
Op::CreateDirectory(
DirectoryIndex(
0,
),
ValidName(
"a".into(),
),
),
], 0)
}

}
Loading