MCPcopy Create free account
hub / github.com/astercloud/aster / TestRandomString

Function TestRandomString

pkg/events/bus_test.go:137–147  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

135}
136
137func TestRandomString(t *testing.T) {
138 s1 := randomString(8)
139 s2 := randomString(8)
140
141 if len(s1) != 8 {
142 t.Errorf("expected length 8, got %d", len(s1))
143 }
144 if s1 == s2 {
145 t.Error("random strings should be different")
146 }
147}
148
149func TestClose(t *testing.T) {
150 eb := NewEventBus()

Callers

nothing calls this directly

Calls 2

randomStringFunction · 0.70
ErrorMethod · 0.65

Tested by

no test coverage detected