You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
563 B

  1. package service
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/assert"
  5. "github.com/stretchr/testify/require"
  6. )
  7. func TestChinaMobileAssetSDKConfigUsesTimeoutsAndTLSVerification(t *testing.T) {
  8. config := newChinaMobileAssetSDKConfig(chinaMobileAssetCredential{AK: "ak", SK: "sk", PoolID: "pool"})
  9. require.NotNil(t, config.ConnectTimeout)
  10. require.NotNil(t, config.ReadTimeout)
  11. require.NotNil(t, config.IgnoreSSL)
  12. assert.Greater(t, *config.ConnectTimeout, int32(0))
  13. assert.Greater(t, *config.ReadTimeout, int32(0))
  14. assert.False(t, *config.IgnoreSSL)
  15. }