示例#1
0
func (gh *Client) getConfig() {
	buildConf := build.GetConfig()

	gh.clientID = buildConf.Github.ClientID
	gh.clientSecret = buildConf.Github.ClientSecret
	gh.scopes = buildConf.Github.Scopes
}
示例#2
0
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")
	}
}
示例#3
0
// Init initialize the bitbucket client
func (c *Client) Init() {
	buildConf := build.GetConfig()
	log.Println(buildConf)
}