Answer mesh/state.info with a bucket's fill and caps, so a bundle's tools can say how full its state is (issue 1952)
This commit is contained in:
@@ -227,6 +227,12 @@ func TestAStaleWriteIsRefusedAndWritesNothing(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// The bucket's fill against its caps, for a bundle's tools.
|
||||
if raw, err := ask(b, "info", map[string]any{"state": "wakes"}); err != nil || !strings.Contains(string(raw),
|
||||
`"bucket":"issues_wakes","bytes":0,"keys":0,"max_bytes":-1,"max_value_bytes":262144,"history":1,"ttl_seconds":0,"key_ttl":true`) {
|
||||
t.Errorf("info of a key-ttl bucket answered %s, %v", raw, err)
|
||||
}
|
||||
|
||||
// Created once, renewed whole, and its end heard: a wake with no timer.
|
||||
heard := make(chan bus.StateChange, 8)
|
||||
stop, err := b.Watch(json.RawMessage(`{"state":"wakes"}`), func(raw json.RawMessage) error {
|
||||
|
||||
Reference in New Issue
Block a user