Remove automatic repository subdirectories
This commit is contained in:
@@ -79,14 +79,3 @@ func TestRetentionRequiresAtLeastOneRule(t *testing.T) {
|
||||
t.Fatalf("age retention rejected: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestManagedRepositoryLocationMustRemainInsideMountPoint(t *testing.T) {
|
||||
repo := Repository{SchemaVersion: 1, ID: "repo", Name: "NAS", Type: RepositorySMB, Location: "/mnt/remotes/nas/NAS", PasswordRef: "password", Mount: &MountConfig{Managed: true, Remote: "//nas/backups", MountPoint: "/mnt/remotes/nas"}}
|
||||
if err := ValidateRepository(repo); err != nil {
|
||||
t.Fatalf("repository subdirectory rejected: %v", err)
|
||||
}
|
||||
repo.Location = "/mnt/remotes/other/NAS"
|
||||
if err := ValidateRepository(repo); err == nil {
|
||||
t.Fatal("repository location outside mountPoint accepted")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user