From d7dc5dfd3f6a0c12a3cacbd907fbaacc61f55bdb Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 29 Oct 2025 09:52:57 +0800 Subject: [PATCH] Fix error handling in invitation resend test - Updated the `TestInvitationResend` function to properly handle errors when sending the invitation request, ensuring that any failures are reported during the test execution. - This change improves the reliability of the test by providing clearer feedback on issues encountered during the invitation process. --- openapi/tests/user/invitation_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openapi/tests/user/invitation_test.go b/openapi/tests/user/invitation_test.go index 20c3c576..a7f7b40f 100644 --- a/openapi/tests/user/invitation_test.go +++ b/openapi/tests/user/invitation_test.go @@ -610,7 +610,10 @@ func TestInvitationResend(t *testing.T) { req.Header.Set("Authorization", "Bearer "+tokenInfo.AccessToken) httpClient := &http.Client{Timeout: 10 * time.Second} - createResp, _ := httpClient.Do(req) + createResp, err := httpClient.Do(req) + if err != nil { + t.Fatalf("Failed to create invitation: %v", err) + } defer createResp.Body.Close() var createResult map[string]interface{}