@@ -303,12 +303,25 @@ func TestDummy(t *testing.T) {
303303 assertSeedFile (t , filepath .Join (mountpoint , "bucket1" , "seed.txt" ), "bucket1-seed" )
304304 assertSeedFile (t , filepath .Join (mountpoint , "bucket2" , "seed.txt" ), "bucket2-seed" )
305305
306+ // The files source's include/exclude filter (exclude **/*.tmp and the top-level cache/ dir) is
307+ // applied per entry end to end: a nested non-excluded file survives, while the .tmp files (at any
308+ // depth) and the entire cache/ subtree are absent from the capture.
309+ assertSeedFile (t , filepath .Join (mountpoint , "files" , "sub" , "keep.txt" ), "nested-keep" )
310+ assert .NoFileExists (t , filepath .Join (mountpoint , "files" , "skip.tmp" ))
311+ assert .NoFileExists (t , filepath .Join (mountpoint , "files" , "sub" , "also.tmp" ))
312+ assert .NoDirExists (t , filepath .Join (mountpoint , "files" , "cache" ))
313+
306314 // The fileGroups source captured both label-selected shard PVCs as one VolumeGroupSnapshot into
307315 // fileGroups/<group>/<pvc>/. Both member subdirs present with their seeded content confirms the
308316 // group was frozen and synced atomically (one subdir per member PVC, keyed by source PVC name).
309317 assertSeedFile (t , filepath .Join (mountpoint , "fileGroups" , "shards" , "dummy-shard-a" , "d.txt" ), "shard-a-seed" )
310318 assertSeedFile (t , filepath .Join (mountpoint , "fileGroups" , "shards" , "dummy-shard-b" , "d.txt" ), "shard-b-seed" )
311319
320+ // The group-wide filter (exclude **/*.log) applied to every member: the .log file seeded into each
321+ // shard is dropped, while the kept payload (d.txt, asserted above) and the member subdir remain.
322+ assert .NoFileExists (t , filepath .Join (mountpoint , "fileGroups" , "shards" , "dummy-shard-a" , "skip.log" ))
323+ assert .NoFileExists (t , filepath .Join (mountpoint , "fileGroups" , "shards" , "dummy-shard-b" , "skip.log" ))
324+
312325 return ctx
313326 }).
314327 Assess ("file-group shards are corrupted before restore" , corruptShardData (namespace )).
0 commit comments