Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test command line usage #105

Open
nirs opened this issue Dec 6, 2024 · 5 comments
Open

Test command line usage #105

nirs opened this issue Dec 6, 2024 · 5 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed kind/test

Comments

@nirs
Copy link
Member

nirs commented Dec 6, 2024

We need to test that using invalid options we fail with expected error code, and do not crash.

Example bugs caused by not having such tests:

This will also test options validation (e.g. failing for missing option or invalid values).

The tests are trivial and do not require any resources, so they can run on standard runners.

@nirs nirs added good first issue Good for newcomers help wanted Extra attention is needed kind/test labels Dec 6, 2024
@saurabhraghuvanshii
Copy link

hi sir, I want to work on this but I need more explanation on it. to meet it in perfect way

@nirs
Copy link
Member Author

nirs commented Apr 1, 2025

Hey @saurabhraghuvanshii this is the way to work on this:

  1. Reproduce the issue manually based on the report
  2. Simplify the command to the minimal version reproducing the issue (using brew prefix is not nedeed)
  3. Add a test running the failing command and failing if the command does not exit with exit code 1.

This test will fail with current code. The next step is to fix the code so the test does not fail.

@saurabhraghuvanshii
Copy link

saurabhraghuvanshii commented Apr 2, 2025

Hi @nirs , I am able to produce this because It needed macos and I am using wsl2

socket_vmnet: macOS is required for this software.
Error: socket_vmnet: An unsatisfied requirement failed this build.

is there is way to test .

and on running these it show nothing

saurabh@MSI:~/open-source-web/socket_vmnet$ >/dev/null 2>&1
saurabh@MSI:~/open-source-web/socket_vmnet$ >/dev/null

@nirs
Copy link
Member Author

nirs commented Apr 2, 2025

It is possible but more challenging to fix this without macOS. Maybe it is better to find another task.

@saurabhraghuvanshii
Copy link

Ya , I see sorry about that sir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed kind/test
Projects
None yet
Development

No branches or pull requests

2 participants