Skip to content

Fix TestSetupCLIAction integration test string expectations#13773

Merged
pelikhan merged 4 commits intomainfrom
copilot/fix-testsetupcli-action-errors
Feb 4, 2026
Merged

Fix TestSetupCLIAction integration test string expectations#13773
pelikhan merged 4 commits intomainfrom
copilot/fix-testsetupcli-action-errors

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

TestSetupCLIAction was failing because test assertions expected strings that don't exist in install.sh.

Changes

  • can_fetch_latest_without_input_version: Check for "using 'latest'" instead of "fetching latest" (matches actual script output: "No version specified, using 'latest'...")
  • has_release_validation: Check for "Verifying binary" instead of "Validating release" (script has binary verification, not "release validation")
// Before
!strings.Contains(string(content), "fetching latest")
!strings.Contains(string(content), "Validating release")

// After  
!strings.Contains(string(content), "using 'latest'")
!strings.Contains(string(content), "Verifying binary")
Original prompt

This section details on the original issue you should resolve

<issue_title>CI: TestSetupCLIAction failing - missing expected strings in install.sh</issue_title>
<issue_description>## Summary

The TestSetupCLIAction integration test is failing on main branch and all PRs. The test expects certain strings in actions/setup-cli/install.sh that don't exist.

Failing Tests

  • TestSetupCLIAction/can_fetch_latest_without_input_version
  • TestSetupCLIAction/has_release_validation

Root Cause

The test in pkg/cli/setup_cli_action_integration_test.go checks for specific strings:

  1. Line 54: Expects both "No version specified" AND "fetching latest" in the script

    • Script has: "No version specified, using 'latest'..."
    • Script missing: "fetching latest"
  2. Line 87: Expects "Validating release" in the script

    • Script does not contain this string

Evidence

setup_cli_action_integration_test.go:55: Script should support fetching latest release when no version is provided
setup_cli_action_integration_test.go:88: Script does not include release validation

Fix Options

  1. Update the test to match the actual strings in the script
  2. Update the script to include the expected strings

Affected CI Runs

Related Files

  • pkg/cli/setup_cli_action_integration_test.go (test)
  • actions/setup-cli/install.sh (script being tested)
  • install-gh-aw.sh (source script that gets synced)</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…ings

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI: TestSetupCLIAction failing due to missing strings Fix TestSetupCLIAction integration test string expectations Feb 4, 2026
Copilot AI requested a review from Mossaka February 4, 2026 18:17
@pelikhan pelikhan marked this pull request as ready for review February 4, 2026 18:56
Copilot AI review requested due to automatic review settings February 4, 2026 18:56
@pelikhan pelikhan merged commit 2ea5694 into main Feb 4, 2026
53 checks passed
@pelikhan pelikhan deleted the copilot/fix-testsetupcli-action-errors branch February 4, 2026 18:57
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 updates the TestSetupCLIAction integration test expectations so they match the actual output and behavior of actions/setup-cli/install.sh, fixing recurring CI failures. The test now looks for the real status messages emitted by the script for “latest” fallback and binary verification.

Changes:

  • Updated can_fetch_latest_without_input_version to assert on "using 'latest'" instead of the non-existent "fetching latest" string, while still requiring "No version specified".
  • Updated has_release_validation to assert on "Verifying binary" instead of "Validating release", aligning the test with the script’s binary verification step.
  • Added a clarifying comment above the binary verification assertion to explain what behavior is being validated.

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

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.

CI: TestSetupCLIAction failing - missing expected strings in install.sh

3 participants