protondrive: fix Go 1.27 vet warning in retry test
Pass the wrapped API error through the error-typed test helper so the %w operand satisfies Go 1.27's printf analyzer without changing test behavior.
This commit is contained in:
committed by
Nick Craig-Wood
parent
55fa9b6ab2
commit
6a617a379b
@@ -86,7 +86,7 @@ func TestShouldRetry(t *testing.T) {
|
|||||||
{"rate limit Status=429 (handled by SDK, not retried here)", ctx, apiErr(429, 0), false},
|
{"rate limit Status=429 (handled by SDK, not retried here)", ctx, apiErr(429, 0), false},
|
||||||
{"client error Status=400", ctx, apiErr(400, 0), false},
|
{"client error Status=400", ctx, apiErr(400, 0), false},
|
||||||
{"client error Status=404", ctx, apiErr(404, 0), false},
|
{"client error Status=404", ctx, apiErr(404, 0), false},
|
||||||
{"wrapped API error retried via errors.As", ctx, fmt.Errorf("wrapped: %w", &proton.APIError{Status: 500}), true},
|
{"wrapped API error retried via errors.As", ctx, fmt.Errorf("wrapped: %w", apiErr(500, 0)), true},
|
||||||
{"non-API error falls back to fserrors.ShouldRetry", ctx, errors.New("plain error"), false},
|
{"non-API error falls back to fserrors.ShouldRetry", ctx, errors.New("plain error"), false},
|
||||||
} {
|
} {
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user