test(coverage): handlers twin StorageExceeded + logs/SSE error arms#164
Merged
Conversation
… error arms Cover the seam2-reachable arms in internal/handlers: - ProvisionForTwin StorageExceeded warning arm (db.go:574 / cache.go:502 / nosql.go:507) via the checkStorageQuota seam forced to exceeded=true, driven through the bufconn fakeProvisioner twin pipeline to a real 201. - ResourceLogs error/edge arms (logs.go): lookup_failed (closed DB), tail<1 clamp, pods_unavailable (List reactor error). - streamLogsSSE WriteString-error arms (sse_logs.go:61 + 72) via a size-1 bufio buffer over an always-failing writer. No production behaviour change; all new lines covered by new tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wrap the k8s fake clientset so pod GetLogs returns a request whose Stream(ctx) errors (rest/fake.RESTClient with Err set), driving the last uncovered ResourceLogs arm to 100%. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up coverage slice, stacked on #163 (now merged to master, cherry-picked clean).
Covers the arms unlocked by #163's seam2 quota seam + the logs clientset seam:
ProvisionForTwin(db/cache/nosql)ResourceLogsstreamLogsSSETest-only changes (4 new
*_twinlogs_test.gofiles); no production behavior change — reuses existing seams.go build ./...+go vet ./internal/handlers/clean.🤖 Generated with Claude Code