fix(test): give the tiered-server harness a real storage view (v0.102.0 follow-up)
v0.102.0 defers a tier whose target storage is absent. The Slice A harness used
fakeStorage{} with NO targets, so after that change it deferred every tier and
five Slice A assertions became vacuous failures.
The product behaviour is correct; the harness never modelled a real box, which
has both storages present. Fixed by giving it local + felhom-pbs.
My error, and worth naming: I ran the suite and committed in the same command,
read 'packages ok: 28' and pushed without checking rc=1. That is exactly the
exit-code trap recorded in this arc twice already.
Full agent suite green: rc=0, 29 packages.
This commit is contained in:
@@ -28,7 +28,13 @@ func tieredServer(t *testing.T, st *fakeStore, localSvc, pbsSvc *fakeBackups) *S
|
||||
Guests: &fakeGuests{},
|
||||
Backups: localSvc,
|
||||
Store: st,
|
||||
Storage: fakeStorage{},
|
||||
// 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},
|
||||
|
||||
Reference in New Issue
Block a user