Manager: add unittest for eventbus topics
The code was doing its work just fine, but I wanted to be sure.
This commit is contained in:
parent
dd98c7471d
commit
4f804958e5
14
internal/manager/eventbus/topics_test.go
Normal file
14
internal/manager/eventbus/topics_test.go
Normal file
@ -0,0 +1,14 @@
|
||||
package eventbus
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestParamterisedTopics(t *testing.T) {
|
||||
uuid := "646f85f3-7166-40bd-9d43-d2b5baaeb42a"
|
||||
assert.Equal(t, EventTopic("/jobs/646f85f3-7166-40bd-9d43-d2b5baaeb42a"), topicForJob(uuid))
|
||||
assert.Equal(t, EventTopic("/jobs/646f85f3-7166-40bd-9d43-d2b5baaeb42a/last-rendered"), topicForJobLastRendered(uuid))
|
||||
assert.Equal(t, EventTopic("/tasklog/646f85f3-7166-40bd-9d43-d2b5baaeb42a"), topicForTaskLog(uuid))
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user