Skip to content

refactor: extract validation and waitFor parsing helpers#358

Open
Syedowais312 wants to merge 1 commit into
microcks:masterfrom
Syedowais312:refactor-test-command-validation
Open

refactor: extract validation and waitFor parsing helpers#358
Syedowais312 wants to merge 1 commit into
microcks:masterfrom
Syedowais312:refactor-test-command-validation

Conversation

@Syedowais312
Copy link
Copy Markdown

Summary

Refactors the test command implementation by extracting:

  • argument validation logic
  • --waitFor parsing logic
  • duplicated error messages

into reusable helper functions.

Changes

  • Added validateTestCommandArgs()
  • Added parseWaitForMilliseconds()
  • Added parseWaitForValue()
  • Centralized repeated error strings into constants
  • Removed duplicated parsing/validation code
  • Fixed variable shadowing for testResultID

Benefits

  • Improves readability
  • Reduces duplicated logic
  • Makes validation easier to maintain and test

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

👋 @Syedowais312

Welcome to the Microcks community! 💖

Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly.

Hope you have a great time there!

Signed-off-by: syedowais312 <syedowais312sf@gmail.com>
@Syedowais312 Syedowais312 force-pushed the refactor-test-command-validation branch from 4edfcfd to 1c77897 Compare May 9, 2026 20:42
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.

1 participant