X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=auth-token-fetch%2FHTTPClient_test.go;h=f9d2fa3ad507108c363eeb00a50b8f227512b71a;hb=HEAD;hp=7b8deb0dc4e31546ce898fbabc4c6fa1c30c3097;hpb=844931b62f35ce6ee2d9dc7274573fc54e14407a;p=nonrtric.git diff --git a/auth-token-fetch/HTTPClient_test.go b/auth-token-fetch/HTTPClient_test.go index 7b8deb0d..f9d2fa3a 100644 --- a/auth-token-fetch/HTTPClient_test.go +++ b/auth-token-fetch/HTTPClient_test.go @@ -23,7 +23,6 @@ package main import ( "crypto/tls" - "net/http" "reflect" "testing" "time" @@ -31,15 +30,6 @@ import ( "github.com/stretchr/testify/require" ) -func TestRequestError_Error(t *testing.T) { - assertions := require.New(t) - actualError := RequestError{ - StatusCode: http.StatusBadRequest, - Body: []byte("error"), - } - assertions.Equal("Request failed due to error response with status: 400 and body: error", actualError.Error()) -} - func Test_CreateClient(t *testing.T) { assertions := require.New(t) @@ -49,11 +39,3 @@ func Test_CreateClient(t *testing.T) { assertions.Equal("*http.Transport", reflect.TypeOf(transport).String()) assertions.Equal(5*time.Second, client.Timeout) } - -func TestIsUrlSecured(t *testing.T) { - assertions := require.New(t) - - assertions.True(IsUrlSecure("https://url")) - - assertions.False(IsUrlSecure("http://url")) -}