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

Adjust test log output to display diffs only for failing test results #920

Merged
merged 2 commits into from
Aug 17, 2021

Conversation

eysk-io
Copy link
Contributor

@eysk-io eysk-io commented Aug 17, 2021

Adjusted test log output to display diffs only when comparing failed test results with expected test results. For example, compilation errors will no longer compare expected results with error logs.

Example compilation error log BEFORE change:

Compiling queries in <path-to-test>.
[1/1 comp 5s] FAILED(COMPILATION) <path-to-test>
0 tests passed; 1 tests failed:
  FAILED: <path-to-test>

errored: <path-to-test>
--- expected
+++ actual
@@ -1,1 +1,1 @@
-| main.go:15:41:15:52 | call to len |
+ERROR: Could not resolve predicate length/0 (<path-to-test>)

Same error AFTER change:

Compiling queries in <path-to-test>.
[1/1 comp 5.5s] FAILED(COMPILATION) <path-to-test>
0 tests passed; 1 tests failed:
  FAILED: <path-to-test>

compilation error: <path-to-test>
ERROR: Could not resolve predicate length/0

Closes #819.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [n/a] @github/docs-content-codeql has been cc'd in all issues for UI or other user-facing changes made by this pull request.

@eysk-io eysk-io requested a review from a team as a code owner August 17, 2021 00:48
@eysk-io eysk-io marked this pull request as draft August 17, 2021 01:19
@eysk-io eysk-io force-pushed the contributing branch 4 times, most recently from d7131d2 to 7064677 Compare August 17, 2021 02:08
@eysk-io eysk-io changed the title Remove unnecessary diff output log for test errors Adjust test log output to display diffs only for failing test results Aug 17, 2021
@eysk-io eysk-io marked this pull request as ready for review August 17, 2021 02:22
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

This is looking great. Thanks for the contribution.

@aeisenberg aeisenberg merged commit 3d8032c into github:main Aug 17, 2021
@eysk-io eysk-io deleted the contributing branch August 17, 2021 16:03
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.

Test compilation errors appear in output diff
2 participants