(t *testing.T)
| 255 | } |
| 256 | |
| 257 | func TestIsLimitExceeded_WrappedError(t *testing.T) { |
| 258 | base := &LimitExceededError{Resource: "agents", Limit: 1, Current: 1} |
| 259 | wrapped := wrap(base) |
| 260 | got, ok := IsLimitExceeded(wrapped) |
| 261 | if !ok || got != base { |
| 262 | t.Errorf("IsLimitExceeded did not unwrap: ok=%v got=%v", ok, got) |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | // wrap exists to test errors.As traversal through fmt.Errorf chains — |
| 267 | // real callers will commonly wrap with context. |
nothing calls this directly
no test coverage detected