Refactor large test files (>1500 lines) into focused modules under 1000 lines #12076
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.
Three test files exceeded 1500 lines, causing navigation difficulties and increasing merge conflict likelihood. Split them into 10 focused files, each under 1000 lines.
Changes
pkg/cli/logs_test.go(1803→4 files)logs_parsing_test.go(760 lines) - Engine-specific parsing, metric extraction, token countinglogs_download_test.go(537 lines) - Download orchestration, zip extraction, artifact handlinglogs_formatting_test.go(68 lines) - Number and file size formattinglogs_filtering_test.go(444 lines) - Run filtering, command flags, agent log discoverypkg/cli/mcp_server_test.go(1572→3 files)mcp_server_tools_test.go(301 lines) - Tool listing, server info, capabilitiesmcp_server_operations_test.go(347 lines) - Status, audit, context cancellationmcp_server_compile_test.go(967 lines) - Compile tool variants (errors, filters, strict mode)pkg/workflow/permissions_test.go(1551→3 files)permissions_parser_test.go(707 lines) - Parser logic, access validationpermissions_operations_test.go(607 lines) - CRUD operations, mergingpermissions_rendering_test.go(263 lines) - YAML rendering, AllRead handlingFile naming convention
Files follow
{component}_{focus_area}_test.gopattern to indicate test scope immediately.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.