From 02fb645b277e714e90ec328825110ddd0aba6398 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Thu, 7 Dec 2023 15:12:58 +0100 Subject: API: Only check if scheme is https --- internal/server/api_test.go | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'internal/server/api_test.go') diff --git a/internal/server/api_test.go b/internal/server/api_test.go index b1e3550..07510b0 100644 --- a/internal/server/api_test.go +++ b/internal/server/api_test.go @@ -55,7 +55,7 @@ func Test_APIGetEndpoints(t *testing.T) { Authorization: "https://example.com/2", Token: "https://example.com/3", }, - err: errors.New("API scheme: 'http', is not equal to authorization scheme: 'https'"), + err: errors.New("API scheme: 'http', is not equal to 'https'"), }, { epl: EndpointList{ @@ -65,30 +65,6 @@ func Test_APIGetEndpoints(t *testing.T) { }, err: errors.New("API scheme: 'https', is not equal to token scheme: 'ftp'"), }, - { - epl: EndpointList{ - API: "https://malicious.com/1", - Authorization: "https://example.com/2", - Token: "https://example.com/3", - }, - err: errors.New("API host: 'malicious.com', is not equal to authorization host: 'example.com'"), - }, - { - epl: EndpointList{ - API: "https://example.com/1", - Authorization: "https://example.com/2", - Token: "https://malicious.com/3", - }, - err: errors.New("API host: 'example.com', is not equal to token host: 'malicious.com'"), - }, - { - epl: EndpointList{ - API: "https://example.com/1", - Authorization: "https://malicious.com/2", - Token: "https://example.com/3", - }, - err: errors.New("API host: 'example.com', is not equal to authorization host: 'malicious.com'"), - }, } for _, tc := range testCases { -- cgit v1.2.3