Skip to content

Strengthen tools timeout validation coverage with testify-based assertions - #50387

Closed
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/testify-expert-improve-test-quality
Closed

Strengthen tools timeout validation coverage with testify-based assertions#50387
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/testify-expert-improve-test-quality

Conversation

Copilot AI commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This updates timeout validation tests for workflow frontmatter to cover key missing tools.startup-timeout and negative timeout cases. It also aligns the test style with the pkg/workflow suite’s testify assertion patterns.

  • Expanded validation matrix for timeout fields

    • Added failing cases for:
      • tools.timeout negative values
      • tools.startup-timeout: 0
      • tools.startup-timeout negative values
      • tools.startup-timeout invalid non-expression string values
    • Added passing case for:
      • tools.startup-timeout as a valid GitHub Actions expression string (${{ ... }})
  • Assertion style modernization

    • Replaced manual t.Fatalf / t.Errorf checks with require/assert to improve consistency and failure readability.
  • Readability and intent clarity

    • Tightened subcase names to explicitly distinguish timeout vs startup-timeout behavior.
    • Added a short note explaining why the test validates via full compilation (end-to-end extraction/validation path).
{
    name: "valid startup-timeout gha expression",
    workflowMd: `
---
tools:
  startup-timeout: "${{ inputs.startup-timeout }}"
---
...`,
    shouldCompile: true,
}

Copilot AI changed the title [WIP] Improve test quality in tools_timeout_validation_test.go Strengthen tools timeout validation coverage with testify-based assertions Aug 4, 2026
Copilot AI requested a review from pelikhan August 4, 2026 20:25
@pelikhan pelikhan closed this Aug 4, 2026
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.

[testify-expert] Improve Test Quality: pkg/workflow/tools_timeout_validation_test.go

2 participants