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

Function TestGetToken

kontrol/kontrol_test.go:502–520  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

500}
501
502func TestGetToken(t *testing.T) {
503 testName := "mathworker5"
504 testVersion := "1.1.1"
505 m := kite.New(testName, testVersion)
506 m.Config = conf.Config.Copy()
507 m.Config.Port = 6666
508 defer m.Close()
509
510 kiteURL := &url.URL{Scheme: "http", Host: "localhost:6666", Path: "/kite"}
511 _, err := m.Register(kiteURL)
512 if err != nil {
513 t.Error(err)
514 }
515
516 _, err = m.GetToken(m.Kite())
517 if err != nil {
518 t.Error(err)
519 }
520}
521
522func TestRegisterKite(t *testing.T) {
523 kiteURL := &url.URL{Scheme: "http", Host: "localhost:4444", Path: "/kite"}

Callers

nothing calls this directly

Calls 6

CopyMethod · 0.80
GetTokenMethod · 0.80
ErrorMethod · 0.65
CloseMethod · 0.45
RegisterMethod · 0.45
KiteMethod · 0.45

Tested by

no test coverage detected