createTestKite creates a test kite, caller of this func should close the kite
(name string, conf *Config, t *testing.T)
| 12 | |
| 13 | // createTestKite creates a test kite, caller of this func should close the kite |
| 14 | func 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 | |
| 27 | func TestKontrol_HandleWebRTC(t *testing.T) { |
| 28 | kont, conf := startKontrol(testkeys.PrivateThird, testkeys.PublicThird, 5501) |
no test coverage detected