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

Add flag to make skip fail #917

Open
andsens opened this issue May 6, 2024 · 2 comments
Open

Add flag to make skip fail #917

andsens opened this issue May 6, 2024 · 2 comments
Labels
Component: Bash Code Everything regarding the bash code Priority: Medium Wrong or misleading documentation, broken behavior with workaround Size: Medium Changes in the same file Type: Enhancement

Comments

@andsens
Copy link

andsens commented May 6, 2024

When running in certain environments like continuous integration where you take care to set up the environment so all tests have their infrastructure available it would be nice if you could instruct bats to fail a test when it is skipped. This way no unintentional dependency changes in either the harness or the CI result in skipped tests going undiscovered.

I would suggest making this an "all or nothing" thing, with no ability to further segment, just to keep things simple. Anything more complicated will require custom solutions anyways.

@andsens andsens added Priority: NeedsTriage Issue has not been vetted yet Type: Enhancement labels May 6, 2024
@martin-schulze-vireso
Copy link
Member

Should this mark skipped tests as failed or should a skipped test still be marked as such but the overall exit status be failed?

@andsens
Copy link
Author

andsens commented May 7, 2024

The main purpose is to have the CI tell you (e.g. a Github "build failed" email) that something is up, not to see red all over the place. So I would say "don't lie in the report", let them still be skipped.
For my use-case at least the important thing is the exit code.

@martin-schulze-vireso martin-schulze-vireso added Priority: Medium Wrong or misleading documentation, broken behavior with workaround Component: Bash Code Everything regarding the bash code Size: Medium Changes in the same file and removed Priority: NeedsTriage Issue has not been vetted yet labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Bash Code Everything regarding the bash code Priority: Medium Wrong or misleading documentation, broken behavior with workaround Size: Medium Changes in the same file Type: Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants