fix(test): Remove t.Parallel() from tests racing on injectedHTTPClient (#1630)

Remove t.Parallel() from tests causing race condition on injectedHTTPClient

Agent-Logs-Url: https://github.com/TwiN/gatus/sessions/bd8f2b87-d453-4653-a61d-4bf4dda4024b

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TwiN <15699766+TwiN@users.noreply.github.com>
This commit is contained in:
Copilot 2026-04-18 20:08:59 -04:00 committed by GitHub
parent 48056def12
commit 42b51f5da5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,6 @@ import (
) )
func TestGetHTTPClient(t *testing.T) { func TestGetHTTPClient(t *testing.T) {
t.Parallel()
cfg := &Config{ cfg := &Config{
Insecure: false, Insecure: false,
IgnoreRedirect: false, IgnoreRedirect: false,
@ -318,7 +317,6 @@ func TestCanCreateConnection(t *testing.T) {
// performs a Client Credentials OAuth2 flow and adds the obtained token as a `Authorization` // performs a Client Credentials OAuth2 flow and adds the obtained token as a `Authorization`
// header to all outgoing HTTP calls. // header to all outgoing HTTP calls.
func TestHttpClientProvidesOAuth2BearerToken(t *testing.T) { func TestHttpClientProvidesOAuth2BearerToken(t *testing.T) {
t.Parallel()
defer InjectHTTPClient(nil) defer InjectHTTPClient(nil)
oAuth2Config := &OAuth2Config{ oAuth2Config := &OAuth2Config{
ClientID: "00000000-0000-0000-0000-000000000000", ClientID: "00000000-0000-0000-0000-000000000000",