| 500 | } |
| 501 | |
| 502 | func 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 | |
| 522 | func TestRegisterKite(t *testing.T) { |
| 523 | kiteURL := &url.URL{Scheme: "http", Host: "localhost:4444", Path: "/kite"} |