tool runner: mesh/stream.publish says an event on the calling bundle's own bound stream (A-42)
Builds: design 42 zfs-owns-zfs §25, §24, lead answer A-42
This commit is contained in:
@@ -120,7 +120,7 @@ type Bus interface {
|
||||
// busStateCalls are the methods of mesh-sdk buscalls a bundle asks and BusState answers.
|
||||
var busStateCalls = map[string]bool{
|
||||
buscalls.ObjectsPut: true, buscalls.ObjectsGet: true, buscalls.ObjectsList: true, buscalls.ObjectsDelete: true,
|
||||
buscalls.ObjectsInfo: true, buscalls.StreamRead: true, buscalls.StreamFill: true, buscalls.WorkQueueSize: true,
|
||||
buscalls.ObjectsInfo: true, buscalls.StreamRead: true, buscalls.StreamFill: true, buscalls.StreamPublish: true, buscalls.WorkQueueSize: true,
|
||||
buscalls.WorkQueueDead: true, buscalls.LedgerApply: true, buscalls.LedgerGet: true, buscalls.LedgerHistory: true,
|
||||
buscalls.LedgerQuery: true, buscalls.LedgerRebuild: true, buscalls.LedgerReindex: true, buscalls.LedgerSnapshot: true,
|
||||
buscalls.LedgerLag: true,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package launch
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/buscalls"
|
||||
)
|
||||
|
||||
// A-42: a launched bundle may ask mesh/stream.publish.
|
||||
func TestABundleMayAskStreamPublish(t *testing.T) {
|
||||
if !busStateCalls[buscalls.StreamPublish] {
|
||||
t.Fatal("mesh/stream.publish is not among the methods a bundle may ask")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user