From 0482fde1894c10d78b3226cb01466295a2c7af18 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 18:30:20 +0000 Subject: [PATCH] fix: update TestMCPGatewayVersionFromFrontmatter to resolve pinned container image The test was comparing bare container:tag against the output of collectDockerImages, which applies embedded container pins from action_pins.json. For v0.2.30 (the default), the embedded pin returns container:tag@sha256:... causing the equality assertion to fail. Fix: resolve the expected image through lookupContainerPin before asserting, so the test accounts for digest pinning while still validating the correct version is used. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5ab849a0-0bfd-4f29-b06b-02949f96e6a4 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/mcp_setup_generator_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/workflow/mcp_setup_generator_test.go b/pkg/workflow/mcp_setup_generator_test.go index bda8e6cc2bd..51c00d9d715 100644 --- a/pkg/workflow/mcp_setup_generator_test.go +++ b/pkg/workflow/mcp_setup_generator_test.go @@ -203,6 +203,11 @@ func TestMCPGatewayVersionFromFrontmatter(t *testing.T) { // Test 1: Verify docker image collection uses the correct version dockerImages := collectDockerImages(workflowData.Tools, workflowData, ActionModeRelease) expectedImage := constants.DefaultMCPGatewayContainer + ":" + tt.expectedVersion + // collectDockerImages applies embedded container pins when available, so resolve + // the pinned reference for the expected image if one exists. + if pin, ok := lookupContainerPin(expectedImage, nil); ok && pin.PinnedImage != "" { + expectedImage = pin.PinnedImage + } found := false for _, img := range dockerImages {