diff --git a/internal/localapi/backup_tiers_test.go b/internal/localapi/backup_tiers_test.go index 42db8df..3815acc 100644 --- a/internal/localapi/backup_tiers_test.go +++ b/internal/localapi/backup_tiers_test.go @@ -27,9 +27,15 @@ func tieredServer(t *testing.T, st *fakeStore, localSvc, pbsSvc *fakeBackups) *S ListenAddr: "127.0.0.1:0", Guests: &fakeGuests{}, Backups: localSvc, - Store: st, - Storage: fakeStorage{}, - Tokens: staticTokens{"A": 8200, "B": 9300}, + Store: st, + // Both tier targets must be PRESENT in the storage view: since v0.102.0 a tier whose target + // storage is absent DEFERS. A real box has both; a fake with no targets would silently + // defer every tier and make these assertions vacuous. + Storage: fakeStorage{targets: []hub.StorageTarget{ + {Name: "local", Type: "local"}, + {Name: "felhom-pbs", Type: "pbs"}, + }}, + Tokens: staticTokens{"A": 8200, "B": 9300}, BackupTiers: []BackupTier{ {TargetID: "local", Cadence: 24 * time.Hour, Primary: true, Service: localSvc}, {TargetID: "felhom-pbs", Cadence: 7 * 24 * time.Hour, Service: pbsSvc},