19 lines
685 B
Go
19 lines
685 B
Go
package process
|
|
|
|
import "testing"
|
|
|
|
// A-397: a kept seat event's stream names its seat and event; a work queue's stream and any other name are none.
|
|
func TestKeptSeatEventOfAStreamName(t *testing.T) {
|
|
for _, c := range []struct{ stream, seat, event string }{
|
|
{"SEAT_node-build-go_toolchain-reported", "node-build-go", "toolchain-reported"},
|
|
{"SEAT_mesh-catalog_versions-filled", "mesh-catalog", "versions-filled"},
|
|
{"SEAT_NODE_BUILD_GO", "", ""},
|
|
{"EVENTS", "", ""},
|
|
} {
|
|
seat, event, ok := keptSeatEvent(c.stream)
|
|
if ok != (c.seat != "") || seat != c.seat || event != c.event {
|
|
t.Errorf("%s: %q %q %v, want %q %q", c.stream, seat, event, ok, c.seat, c.event)
|
|
}
|
|
}
|
|
}
|