1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-04 02:28:27 +00:00
restic/internal/server/rofs/fs_test.go

36 lines
622 B
Go
Raw Normal View History

2024-02-25 17:26:55 +01:00
package rofs
import (
"context"
"testing"
"testing/fstest"
"time"
"github.com/restic/restic/internal/repository"
"github.com/restic/restic/internal/restic"
)
func TestROFs(t *testing.T) {
repo := repository.TestRepository(t)
timestamp, err := time.Parse(time.RFC3339, "2024-02-25T17:21:56+01:00")
if err != nil {
t.Fatal(err)
}
restic.TestCreateSnapshot(t, repo, timestamp, 2)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
root, err := New(ctx, repo, Config{})
if err != nil {
t.Fatal(err)
}
err = fstest.TestFS(root, "snapshots")
if err != nil {
t.Fatal(err)
}
}