Debian Codegraph @

ros/config_test.go

raw symbols SCIP
1 package ros
2
3 import (
4 "os"
5
6 "github.com/denverdino/aliyungo/common"
7 )
8
9 //Modify with your Access Key Id and Access Key Secret
10
11 var (
12 TestAccessKeyId = os.Getenv("AccessKeyId")
13 TestAccessKeySecret = os.Getenv("AccessKeySecret")
14 TestSecurityToken = os.Getenv("SecurityToken")
15 TestRegionID = common.Region(os.Getenv("RegionId"))
16
17 clientForTestCase = NewTestClient()
18 debugClientForTestCase = NewTestClientForDebug()
19 )
20
21 var testClient *Client
22
23 func NewTestClient() *Client {
24 if testClient == nil {
25 testClient = NewClient(TestAccessKeyId, TestAccessKeySecret)
26 }
27 testClient.SetSecurityToken(TestSecurityToken)
28 return testClient
29 }
30
31 var testDebugClient *Client
32
33 func NewTestClientForDebug() *Client {
34 if testDebugClient == nil {
35 testDebugClient = NewClient(TestAccessKeyId, TestAccessKeySecret)
36 testDebugClient.SetDebug(true)
37 }
38 testDebugClient.SetSecurityToken(TestSecurityToken)
39 return testDebugClient
40 }