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.

22 lines
435 B

  1. package rpcclient
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/require"
  5. )
  6. func TestHTTPClientMakeHTTPDialer(t *testing.T) {
  7. remote := []string{"https://foo-bar.com:80", "http://foo-bar.net:80"}
  8. for _, f := range remote {
  9. protocol, address, err := parseRemoteAddr(f)
  10. require.NoError(t, err)
  11. dialFn := makeHTTPDialer(f)
  12. addr, err := dialFn(protocol, address)
  13. require.NoError(t, err)
  14. require.NotNil(t, addr)
  15. }
  16. }