| 1 |
package cs |
| 2 |
|
| 3 |
import ( |
| 4 |
"os" |
| 5 |
|
| 6 |
"github.com/denverdino/aliyungo/common" |
| 7 |
) |
| 8 |
|
| 9 |
|
| 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 |
|
| 18 |
var testClient *Client |
| 19 |
|
| 20 |
func NewTestClient() *Client { |
| 21 |
if testClient == nil { |
| 22 |
testClient = NewClient(TestAccessKeyId, TestAccessKeySecret) |
| 23 |
} |
| 24 |
return testClient |
| 25 |
} |
| 26 |
|
| 27 |
var testDebugClient *Client |
| 28 |
|
| 29 |
func NewTestClientForDebug() *Client { |
| 30 |
if testDebugClient == nil { |
| 31 |
testDebugClient = NewClient(TestAccessKeyId, TestAccessKeySecret) |
| 32 |
testDebugClient.SetDebug(true) |
| 33 |
} |
| 34 |
return testDebugClient |
| 35 |
} |
| 36 |
|
| 37 |
var testDebugAussumeRoleClient *Client |
| 38 |
|
| 39 |
func NewTestDebugAussumeRoleClient() *Client { |
| 40 |
if testDebugAussumeRoleClient == nil { |
| 41 |
testDebugAussumeRoleClient = NewClientForAussumeRole(TestAccessKeyId, TestAccessKeySecret, TestSecurityToken) |
| 42 |
testDebugAussumeRoleClient.SetDebug(true) |
| 43 |
} |
| 44 |
return testDebugAussumeRoleClient |
| 45 |
} |