Skip to content

refactor: simplification - #134

Open
rustatian wants to merge 1 commit into
masterfrom
refactor/simplification
Open

rustatian wants to merge 1 commit into
masterfrom
refactor/simplification

Conversation

@rustatian

Copy link
Copy Markdown
Member

Reason for This PR

Remove duplicate service command creation.

Description of Changes

  • Create service commands through one path that selects the configured timeout.
  • Pass optional arguments directly to exec.CommandContext and retain the existing command test cases.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

PR Checklist

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 4, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused refactor preserves existing behavior and remains covered by the existing command and lifecycle tests.

Review effort: Balanced
Findings: None

What changed in this PR

Simplifies service process command creation while preserving timeout behavior and command arguments.

Changes:

  • Consolidates timed and untimed command creation.
  • Updates existing tests to use the unified path.
File Description
process.go Unifies process command construction and timeout selection.
process_test.go Adapts command tests to the unified helper.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.63%. Comparing base (593e1a9) to head (632a852).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
+ Coverage   98.39%   98.63%   +0.23%     
==========================================
  Files           6        6              
  Lines         373      365       -8     
==========================================
- Hits          367      360       -7     
+ Misses          6        5       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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