Tests for initHumanUsers and initinitRobotUsers.

Change the Cluster class in the process to implelement Teams API
calls and Oauth token fetches as interfaces, so that we can mock
them in the tests.
This commit is contained in:
Oleksii Kliukin
2017-12-04 10:49:25 +01:00
parent 611cfe96d6
commit 637921cdee
4 changed files with 173 additions and 26 deletions
+4
View File
@@ -43,6 +43,10 @@ type httpClient interface {
Do(req *http.Request) (*http.Response, error)
}
type Interface interface {
TeamInfo(teamID, token string) (tm *Team, err error)
}
// API describes teams API
type API struct {
httpClient