func (gh *Client) getConfig() { buildConf := build.GetConfig() gh.clientID = buildConf.Github.ClientID gh.clientSecret = buildConf.Github.ClientSecret gh.scopes = buildConf.Github.Scopes }
func TestGetConfig(t *testing.T) { buildConf := build.GetConfig() client := &Client{} client.getConfig() if client.clientID != buildConf.Github.ClientID || client.clientSecret != buildConf.Github.ClientSecret || client.scopes == nil { t.Error("Didn't get the config properly") } }
// Init initialize the bitbucket client func (c *Client) Init() { buildConf := build.GetConfig() log.Println(buildConf) }