Merge branch 'feat/47-G-build' into feat/47-G-build-contracts
This commit is contained in:
@@ -144,13 +144,17 @@ func fillBody(store string, bytes int64) []byte {
|
||||
}
|
||||
|
||||
// design 47 G §181, §263: a store past its share is `store-filling` naming the part and the store, full is urgent, `room` and a
|
||||
// fill under 70 % clear it.
|
||||
// fill under 80 % clear it.
|
||||
func TestAStoreFillingIsAFinding(t *testing.T) {
|
||||
w, o, _ := setup()
|
||||
key := FindingKey(ScopeDelivery, "mesh-delivery-records", KindStoreFilling)
|
||||
w.StoreFill("mesh-delivery", "filling", fillBody("records", 60))
|
||||
if len(o.findings) != 0 {
|
||||
t.Fatalf("under 70 %%: %v", o.findings)
|
||||
t.Fatalf("under 80 %%: %v", o.findings)
|
||||
}
|
||||
w.StoreFill("mesh-delivery", "filling", fillBody("records", 75))
|
||||
if len(o.findings) != 0 {
|
||||
t.Fatalf("75 %% is under §181's 80 %%: %v", o.findings)
|
||||
}
|
||||
w.StoreFill("mesh-delivery", "filling", fillBody("records", 85))
|
||||
if o.findings[key].Severity != Warning {
|
||||
|
||||
@@ -37,7 +37,7 @@ const uncovered = "uncovered:record-open"
|
||||
const RecordOpenBound = 24 * time.Hour
|
||||
|
||||
// FillingFrom is the share of a store's cap under which a `filling` clears its finding (design 47 G §181).
|
||||
const FillingFrom = 0.70
|
||||
const FillingFrom = 0.80
|
||||
|
||||
// StoreFill hears a seat's `filling`, `full` or `room` of one of its stores. A `filling` is a warning, naming the part and the
|
||||
// store, unless its share is under FillingFrom, which clears it; `full` is urgent, naming what it refuses; `room` clears either.
|
||||
|
||||
Reference in New Issue
Block a user