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.
This commit is contained in:
Max 2025-10-29 09:52:57 +08:00
parent 481a6edbd5
commit d7dc5dfd3f

View file

@ -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{}