MCPcopy Index your code
hub / github.com/koding/kite / createTestKite

Function createTestKite

kontrol/handlers_test.go:14–25  ·  view source on GitHub ↗

createTestKite creates a test kite, caller of this func should close the kite

(name string, conf *Config, t *testing.T)

Source from the content-addressed store, hash-verified

12
13// createTestKite creates a test kite, caller of this func should close the kite
14func createTestKite(name string, conf *Config, t *testing.T) *HelloKite {
15 k, err := NewHelloKite(name, conf)
16 if err != nil {
17 t.Fatalf("error creating %s: %s", name, err)
18 }
19
20 k.Kite.HandleFunc(kite.WebRTCHandlerName, func(req *kite.Request) (interface{}, error) {
21 return nil, fmt.Errorf("%s is called", name)
22 })
23
24 return k
25}
26
27func TestKontrol_HandleWebRTC(t *testing.T) {
28 kont, conf := startKontrol(testkeys.PrivateThird, testkeys.PublicThird, 5501)

Callers 1

TestKontrol_HandleWebRTCFunction · 0.85

Calls 2

NewHelloKiteFunction · 0.85
HandleFuncMethod · 0.80

Tested by

no test coverage detected