| 1 | package cms |
| 2 | |
| 3 | import ( |
| 4 | "os" |
| 5 | |
| 6 | "github.com/denverdino/aliyungo/common" |
| 7 | ) |
| 8 | |
| 9 | var ( |
| 10 | TestAccessKeyId = os.Getenv("AccessKeyId") |
| 11 | TestAccessKeySecret = os.Getenv("AccessKeySecret") |
| 12 | TestSecurityToken = os.Getenv("SecurityToken") |
| 13 | TestRegionID = common.Region(os.Getenv("RegionId")) |
| 14 | ) |
| 15 | |
| 16 | var testClient *CMSClient |
| 17 | |
| 18 | func NewTestClient() *CMSClient { |
| 19 | if testClient == nil { |
| 20 | testClient = NewCMSClient(TestAccessKeyId, TestAccessKeySecret) |
| 21 | } |
| 22 | return testClient |
| 23 | } |
| 24 | |
| 25 | var testDebugClient *CMSClient |
| 26 | |
| 27 | func NewTestClientForDebug() *CMSClient { |
| 28 | if testDebugClient == nil { |
| 29 | testDebugClient = NewCMSClient(TestAccessKeyId, TestAccessKeySecret) |
| 30 | testDebugClient.SetDebug(true) |
| 31 | } |
| 32 | return testDebugClient |
| 33 | } |