mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
test/postgres_flat: POSIX subtests set up their own fixtures
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
378ff2105d
commit
40f7ed262e
1 file changed
+5
-3
@@ -99,6 +99,7 @@ func TestPosix(t *testing.T) {
|
||||
mnt := c.mount(t, "mount")
|
||||
client := c.s3Client()
|
||||
root := filepath.Join(mnt, "posix")
|
||||
require.NoError(t, os.MkdirAll(root, 0o755))
|
||||
write := func(t *testing.T, rel, body string) {
|
||||
t.Helper()
|
||||
p := filepath.Join(root, rel)
|
||||
@@ -213,10 +214,11 @@ func TestPosix(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("a new mount reads the same tree from the store", func(t *testing.T) {
|
||||
write(t, "remount/sub/deep.txt", "deep")
|
||||
require.NoError(t, os.Symlink("sub/deep.txt", filepath.Join(root, "remount/link")))
|
||||
want := tree(t, root)
|
||||
require.Contains(t, want, "mv/dst/sub/two.txt")
|
||||
require.Contains(t, want, "links/soft -> hard.txt")
|
||||
require.Contains(t, want, fmt.Sprintf("many/f%05d", filer.PaginationSize+99))
|
||||
require.Contains(t, want, "remount/sub/deep.txt")
|
||||
require.Contains(t, want, "remount/link -> sub/deep.txt")
|
||||
unmount(t, mnt)
|
||||
fresh := c.mount(t, "remount")
|
||||
got := tree(t, filepath.Join(fresh, "posix"))
|
||||
|
||||
Reference in new issue
Block a user