27 lines
818 B
Go
27 lines
818 B
Go
//go:build integration
|
|
|
|
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.novox.be/novox/mesh-sdk/go/announce"
|
|
"git.novox.be/novox/mesh-sdk/go/announcetest"
|
|
"git.novox.be/novox/mesh-sdk/go/process"
|
|
)
|
|
|
|
// 1790/S (ADR 0495 clause 5): started against a bus of the test's own, the module announces on it every state it keeps,
|
|
// readable as other modules' manifests need.
|
|
func TestTheModuleAnnouncesEveryStateItKeepsOnTheBus(t *testing.T) {
|
|
announcetest.Check(t, "mesh-delivery-gate", Kept, func(url string) func() {
|
|
conn, err := process.Connect(process.Account{URL: url, Module: "mesh-delivery-gate", Node: "ace", User: "u", Password: "p"})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if err := announceKept(func(s ...announce.State) error { return conn.Keeps(s...) }); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
return conn.Close
|
|
})
|
|
}
|