gofmt: normalize internal/localapi (whitespace only)
Swept up by gofmt -w on the package while adding the guest-power observable. No semantic change; 3 of 5 files are tests.
This commit is contained in:
@@ -260,7 +260,7 @@ func TestBackupTiers_AdvertisesPrimaryFirst(t *testing.T) {
|
|||||||
if !resp.Data.Tiers[0].Primary || resp.Data.Tiers[0].Target != "local" {
|
if !resp.Data.Tiers[0].Primary || resp.Data.Tiers[0].Target != "local" {
|
||||||
t.Fatalf("primary must be first and flagged; got %+v", resp.Data.Tiers)
|
t.Fatalf("primary must be first and flagged; got %+v", resp.Data.Tiers)
|
||||||
}
|
}
|
||||||
if resp.Data.Tiers[1].Target != "felhom-pbs" || resp.Data.Tiers[1].CadenceSeconds != int64((7 * 24 * time.Hour).Seconds()) {
|
if resp.Data.Tiers[1].Target != "felhom-pbs" || resp.Data.Tiers[1].CadenceSeconds != int64((7*24*time.Hour).Seconds()) {
|
||||||
t.Fatalf("PBS tier mis-advertised: %+v", resp.Data.Tiers[1])
|
t.Fatalf("PBS tier mis-advertised: %+v", resp.Data.Tiers[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -601,6 +601,7 @@ func dueFor(t *testing.T, h http.Handler, target string) BackupDueResponse {
|
|||||||
// COMPANION RED-PROOF (observed): delete the newestArchiveOn fold-in from handleBackupDue (the
|
// COMPANION RED-PROOF (observed): delete the newestArchiveOn fold-in from handleBackupDue (the
|
||||||
// pre-R-84 shape, in-memory only) → this fails with
|
// pre-R-84 shape, in-memory only) → this fails with
|
||||||
// "a restart must NOT make the tier due when the storage holds a 2h-old backup;
|
// "a restart must NOT make the tier due when the storage holds a 2h-old backup;
|
||||||
|
//
|
||||||
// got {... Due:true Reason:no successful backup recorded yet ...}". Restored.
|
// got {... Due:true Reason:no successful backup recorded yet ...}". Restored.
|
||||||
func TestBackupDue_ColdStore_UsesStorageGroundTruth(t *testing.T) {
|
func TestBackupDue_ColdStore_UsesStorageGroundTruth(t *testing.T) {
|
||||||
h := listerServer(t, &fakeStore{}, archiveLister{
|
h := listerServer(t, &fakeStore{}, archiveLister{
|
||||||
@@ -610,7 +611,7 @@ func TestBackupDue_ColdStore_UsesStorageGroundTruth(t *testing.T) {
|
|||||||
if got.Due {
|
if got.Due {
|
||||||
t.Fatalf("a restart must NOT make the tier due when the storage holds a 2h-old backup; got %+v", got)
|
t.Fatalf("a restart must NOT make the tier due when the storage holds a 2h-old backup; got %+v", got)
|
||||||
}
|
}
|
||||||
if got.AgeSecs == nil || *got.AgeSecs != int64((2 * time.Hour).Seconds()) {
|
if got.AgeSecs == nil || *got.AgeSecs != int64((2*time.Hour).Seconds()) {
|
||||||
t.Fatalf("the age must come from the storage; got %+v", got)
|
t.Fatalf("the age must come from the storage; got %+v", got)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user