Skip to content

Conversation

akhil-rasheed
Copy link

Description

Adds a functional test suite for the tool - Closes #123

Adds a new functional test suite to the project to alleviate the burden and error-prone process for maintainers to have to build and functionally test each PR change that contains core validator changes.

The functional tests compile the CLI binary once and then execute it as a subprocess for each test case. Assertions are made against the CLI's exit code and stdout/stderr to verify the correct behavior.

The following tests have been added:
- `TestHelp`: Tests the `--help` flag.
- `TestVersion`: Tests the `--version` flag.
- `TestBadPath`: Tests the handling of a non-existent path.
- `TestInvalidFlag`: Tests the handling of an invalid flag.
- `TestBasicValidation`: Tests a basic validation run.
- `TestQuietFlag`: Tests the `--quiet` flag.
@kehoecj kehoecj added OSS Community Contribution Contributions from the OSS Community waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers labels Oct 10, 2025
@kehoecj kehoecj self-requested a review October 10, 2025 14:27
Copy link
Collaborator

@kehoecj kehoecj left a comment

Choose a reason for hiding this comment

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

Some changes:

  • Would like the tests to be broken out into files by features being tested instead of a single functional_test.go file to support future test growth
  • Look into using something like testscript rather than building the CLI in the tests

@kehoecj kehoecj added pr-action-requested PR is awaiting feedback from the submitting developer and removed waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers labels Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OSS Community Contribution Contributions from the OSS Community pr-action-requested PR is awaiting feedback from the submitting developer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create functional test suite

2 participants