You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I recently encountered an edge case that causes the go-unit-tests hook to falsely succeed when it's supposed to fail. If the go list ./... command fails, the main script doesn't terminate as it directly stores the output in FILE. This causes no tests to run in the next step and hence always succeeds.
Minimum working example
One example where this can occur is if two files in the same folder have different package names, and there aren't any unit tests added yet. This example will pass the hook but will fail the go test ./... command with error found packages badname (bar.go) and lib (foo.go) in <your_dir>/lib
Hello! I recently encountered an edge case that causes the
go-unit-tests
hook to falsely succeed when it's supposed to fail. If thego list ./...
command fails, the main script doesn't terminate as it directly stores the output inFILE
. This causes no tests to run in the next step and hence always succeeds.Minimum working example
One example where this can occur is if two files in the same folder have different package names, and there aren't any unit tests added yet. This example will pass the hook but will fail the
go test ./...
command with errorfound packages badname (bar.go) and lib (foo.go) in <your_dir>/lib
Here's the file structure
The text was updated successfully, but these errors were encountered: