<commit_before>package integration

import (
	"testing"
	"fmt"
	"github.com/aliyun/alibaba-cloud-sdk-go/services/cdn"
	"github.com/stretchr/testify/assert"
)

func TestCdnInstance(t *testing.T) {

	// init client
	config := getConfigFromEnv()
	cdnClient, err := cdn.NewClientWithAccessKey("cn-hangzhou", config.AccessKeyId, config.AccessKeySecret)
	assertErrorNil(t, err, "Failed to init client")
	fmt.Printf("Init client success\n")

	// getCdnStatus
	assertCdnStatus(t, cdnClient)
}

func assertCdnStatus(t *testing.T, client *cdn.Client){
	fmt.Print("describing cdn service status...")
	request := cdn.CreateDescribeCdnServiceRequest()
	response, err := client.DescribeCdnService(request)
	assertErrorNil(t, err, "Failed to describing cdn service status")
	assert.Equal(t, 200, response.GetHttpStatus(), response.GetHttpContentString())
	assert.Equal(t, "PayByTraffic", response.InternetChargeType)
	fmt.Printf("ok(%d)!\n", response.GetHttpStatus())
}<commit_msg>test key<commit_after>package integration

import (
	"testing"
	"fmt"
	"github.com/aliyun/alibaba-cloud-sdk-go/services/cdn"
	"github.com/stretchr/testify/assert"
	"os"
)

func TestCdnInstance(t *testing.T) {

	// init client
	config := getConfigFromEnv()
	cdnClient, err := cdn.NewClientWithAccessKey("cn-hangzhou", config.AccessKeyId, config.AccessKeySecret)
	assertErrorNil(t, err, "Failed to init client")
	fmt.Printf("Init client success\n")

	// getCdnStatus
	assertCdnStatus(t, cdnClient)

	// test travis if the key is hidden
	testKey := os.Getenv("TestKey")
	fmt.Println("test key : " + testKey)
}

func assertCdnStatus(t *testing.T, client *cdn.Client){
	fmt.Print("describing cdn service status...")
	request := cdn.CreateDescribeCdnServiceRequest()
	response, err := client.DescribeCdnService(request)
	assertErrorNil(t, err, "Failed to describing cdn service status")
	assert.Equal(t, 200, response.GetHttpStatus(), response.GetHttpContentString())
	assert.Equal(t, "PayByTraffic", response.InternetChargeType)
	fmt.Printf("ok(%d)!\n", response.GetHttpStatus())
}
{'fraction_non_alphanumeric': 0.14103819784524976, 'fraction_numerical': 0.002938295788442703, 'mean_word_length': 5.878787878787879, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2607388', 'n_tokens_mistral': 719, 'n_tokens_neox': 702, 'n_words': 138}