Skip to content

Fix test failures when running make test#12055

Merged
Mossaka merged 9 commits intomainfrom
copilot/fix-test-failures
Jan 27, 2026
Merged

Fix test failures when running make test#12055
Mossaka merged 9 commits intomainfrom
copilot/fix-test-failures

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

Tests were written for an older implementation but the codebase has since been updated. Tests expected old MCP config format (type: local, command: docker) but implementation now uses new format (type: stdio, container:).

Changes

MCP Config Format Updates

  • Updated test assertions from "type": "local""type": "stdio" across test files
  • Changed "command": "docker" expectations to "container": "..." format
  • Updated MCP server version references from v0.27.0/v0.29.0 → v0.30.1

Type Reference Fixes

  • mcp_add_integration_test.go: Fixed ServerServerResponse/ServerDetail, Transport*Transport

Copilot Installer Tests

  • Updated from embedded bash script pattern to new installer script format:
// Old expectation
"sudo VERSION=0.0.369 bash /tmp/copilot-install.sh"

// New expectation  
"/opt/gh-aw/actions/install_copilot_cli.sh 0.0.369"

Maintenance Workflow Tests

  • Fixed to compile entire directory instead of specific files (maintenance workflow generation is skipped for specific file compilation per design)

Other Fixes

  • Updated anchore/sbom-action@v0 SHA pin to current tag
  • Removed obsolete gh aw version check from copilot setup tests
  • Fixed error messages/comments to match new stdio type
Original prompt

Fix the test failures when you run make test


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…h current implementations

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
…ormat (stdio/container)

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
@Mossaka Mossaka marked this pull request as ready for review January 27, 2026 17:55
Mossaka and others added 2 commits January 27, 2026 09:55
Copilot AI changed the title [WIP] Fix test failures when running make test Fix test failures when running make test Jan 27, 2026
Copilot AI requested a review from Mossaka January 27, 2026 18:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes test failures caused by outdated test assertions that expected the old MCP config format. The codebase has migrated from using type: local with command: docker to type: stdio with container: <image> format, following the MCP Gateway Specification v1.0.0. The tests needed to be updated to match the new implementation.

Changes:

  • Updated test assertions from old MCP format ("type": "local", "command": "docker") to new format ("type": "stdio", "container": "...")
  • Updated MCP server version references from v0.27.0/v0.29.0 to v0.30.1
  • Fixed type references in integration tests (ServerServerResponse/ServerDetail, Transport*Transport)
  • Updated Copilot installer tests to expect new installer script path
  • Fixed maintenance workflow tests to compile entire directory (per design)

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/workflow/mcp_renderer_test.go Updated type assertions from "local" to "stdio" but left error messages unchanged (2 issues found)
pkg/workflow/mcp_config_test.go Updated GitHub MCP server version from v0.27.0 to v0.30.1
pkg/workflow/mcp_config_refactor_test.go Updated type assertion from "local" to "stdio" but missed updating "command" check (1 issue found)
pkg/workflow/mcp_config_copilot_test.go Updated type assertions and comments to reflect stdio format
pkg/workflow/github_remote_mode_test.go Updated type assertions and version to v0.30.1
pkg/workflow/github_lockdown_test.go Updated type assertions from "local" to "stdio"
pkg/workflow/github_lockdown_integration_test.go Updated type assertions from "local" to "stdio"
pkg/workflow/engine_helpers_github_test.go Updated type assertions from "local" to "stdio"
pkg/workflow/docker_predownload_test.go Updated version references from v0.29.0 to v0.30.1
pkg/workflow/custom_engine_test.go Updated type assertion from "local" to "stdio"
pkg/workflow/copilot_github_mcp_test.go Simplified test expectations to match new config format that omits tools field
pkg/workflow/copilot_engine_test.go Updated version to v0.30.1 but missed updating type/command expectations (1 critical issue found)
pkg/workflow/codex_engine_test.go Updated version from v0.29.0 to v0.30.1
pkg/workflow/copilot_installer_test.go Updated to expect new installer script path at /opt/gh-aw/actions/install_copilot_cli.sh
pkg/cli/mcp_add_integration_test.go Fixed type references to use ServerResponse/ServerDetail and pointer for Transport
pkg/cli/copilot_setup_test.go Removed obsolete check for "gh aw version" command
pkg/cli/compile_maintenance_test.go Changed to compile entire directory instead of specific files
Comments suppressed due to low confidence (1)

pkg/workflow/copilot_engine_test.go:847

  • Test expectations are incomplete. Lines 841-842 and 846-847 still expect the old MCP config format with "type": "local" and "command": "docker", but these should be updated to "type": "stdio" and "container": "..." to match the new format used throughout the codebase. The test will fail unless these expectations are also updated.
		`"type": "local",`,
		`"command": "docker",`,
		`"ghcr.io/github/github-mcp-server:v0.30.1"`,
		`},`, // GitHub should NOT be last (comma after closing brace)
		`"playwright": {`,
		`"type": "local",`,
		`"command": "docker",`,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

`"playwright": {`,
`"type": "local"`,
`"type": "stdio"`,
`"command": "docker"`,
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test expectation is outdated. Line 31 expects "command": "docker" but the implementation (mcp_config_playwright_renderer.go:46) now uses "container": "..." format according to the MCP Gateway Specification v1.0.0. This test assertion should be updated to match the new implementation or removed if "command" is no longer part of the output.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

@Mossaka Mossaka merged commit b8efa22 into main Jan 27, 2026
1 check failed
@Mossaka Mossaka deleted the copilot/fix-test-failures branch January 27, 2026 18:16
Copilot stopped work on behalf of Mossaka due to an error January 27, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants