Skip to content

fix: Update the things#7321

Closed
JanDeDobbeleer wants to merge 1 commit intomainfrom
test-workflow
Closed

fix: Update the things#7321
JanDeDobbeleer wants to merge 1 commit intomainfrom
test-workflow

Conversation

@JanDeDobbeleer
Copy link
Copy Markdown
Owner

Prerequisites

  • I have read and understood the contributing guide.
  • The commit message follows the conventional commits guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added/updated (for bug fixes / features).

Copilot AI review requested due to automatic review settings February 18, 2026 09:47
Copy link
Copy Markdown
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

Updates the Golang segment unit test expectations for versions parsed from go.mod, which validates the segment’s version-detection behavior when parse_mod_file is enabled.

Changes:

  • Adjusts the expected version string for the go.mod parsing test case in TestGolang.

{Case: "Go 1.15", ExpectedString: "1.15.8", Version: "go version go1.15.8 darwin/amd64"},
{Case: "Go 1.16", ExpectedString: "1.16", Version: "go version go1.16 darwin/amd64"},
{Case: "go.mod 1.26.0", ParseModFile: true, HasModFileInParentDir: true, ExpectedString: "1.26.0"},
{Case: "go.mod 1.26.0", ParseModFile: true, HasModFileInParentDir: true, ExpectedString: "1.26.1"},
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

This test case reads ../go.mod (which resolves to src/go.mod) and src/go.mod currently declares go 1.26.0. parseModFile() returns file.Go.Version verbatim, so the expected value here should match the go.mod directive (or the fixture should be updated). As written, this change makes the expectation inconsistent with the fixture and with the later case that expects 1.26.0 when both go.work and go.mod are present.

Suggested change
{Case: "go.mod 1.26.0", ParseModFile: true, HasModFileInParentDir: true, ExpectedString: "1.26.1"},
{Case: "go.mod 1.26.0", ParseModFile: true, HasModFileInParentDir: true, ExpectedString: "1.26.0"},

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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