config_test.go 883 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package dns
  2. //Modify with your Access Key Id and Access Key Secret
  3. const (
  4. TestAccessKeyId = "MY_ACCESS_KEY_ID"
  5. TestAccessKeySecret = "MY_ACCESS_KEY_SECRET"
  6. TestDomainName = "aisafe.win"
  7. TestDomainGroupName = "testgroup"
  8. TestChanegGroupName = "testchangegroup"
  9. )
  10. var testClient *Client
  11. func NewTestClient() *Client {
  12. if testClient == nil {
  13. testClient = NewClient(TestAccessKeyId, TestAccessKeySecret)
  14. }
  15. return testClient
  16. }
  17. // change DNSDefaultEndpoint to "http://alidns.aliyuncs.com"
  18. func NewTestClientNew() *Client {
  19. if testClient == nil {
  20. testClient = NewClientNew(TestAccessKeyId, TestAccessKeySecret)
  21. }
  22. return testClient
  23. }
  24. var testDebugClient *Client
  25. func NewTestClientForDebug() *Client {
  26. if testDebugClient == nil {
  27. testDebugClient = NewClient(TestAccessKeyId, TestAccessKeySecret)
  28. testDebugClient.SetDebug(true)
  29. }
  30. return testDebugClient
  31. }