diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-08-22 17:11:05 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-10-28 17:02:14 +0100 |
| commit | 3b679892d4908f9ebe45931f31fb43aafe5f7e02 (patch) | |
| tree | f20b10fda9b97c4c523065d2c60bbaf8b10376ae /internal/api | |
| parent | bca773c49f0c2e66b5c26a59b8bb772520afb9bd (diff) | |
Test Server: Set default Handler response code to 200
Diffstat (limited to 'internal/api')
| -rw-r--r-- | internal/api/api_test.go | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/internal/api/api_test.go b/internal/api/api_test.go index fcf02e9..2d17e96 100644 --- a/internal/api/api_test.go +++ b/internal/api/api_test.go @@ -177,7 +177,6 @@ func createTestAPI(t *testing.T, tok *eduoauth.Token, gt []string, hps []test.Ha "v": "0.0.0" } `, listen.Addr().String()), - ResponseCode: 200, }, { Path: "/test-token-endpoint", @@ -284,7 +283,6 @@ func TestAPIInfo(t *testing.T) { } } `, - ResponseCode: 200, }, info: &profiles.Info{ Info: profiles.ListInfo{ @@ -318,7 +316,6 @@ func TestAPIInfo(t *testing.T) { } } `, - ResponseCode: 200, }, info: &profiles.Info{ Info: profiles.ListInfo{ @@ -386,20 +383,18 @@ func TestAPIConnect(t *testing.T) { }{ { hp: test.HandlerPath{ - Method: http.MethodPost, - Path: "/test-api-endpoint/connect", - Response: ``, - ResponseCode: 200, + Method: http.MethodPost, + Path: "/test-api-endpoint/connect", + Response: ``, }, cd: nil, err: ErrNoProtocols, }, { hp: test.HandlerPath{ - Method: http.MethodPost, - Path: "/test-api-endpoint/connect", - Response: ``, - ResponseCode: 200, + Method: http.MethodPost, + Path: "/test-api-endpoint/connect", + Response: ``, }, cd: nil, protos: []protocol.Protocol{protocol.Unknown}, @@ -407,10 +402,9 @@ func TestAPIConnect(t *testing.T) { }, { hp: test.HandlerPath{ - Method: http.MethodPost, - Path: "/test-api-endpoint/connect", - Response: ``, - ResponseCode: 200, + Method: http.MethodPost, + Path: "/test-api-endpoint/connect", + Response: ``, }, cd: nil, protos: []protocol.Protocol{protocol.OpenVPN, protocol.WireGuard, protocol.Unknown}, |
