-
Notifications
You must be signed in to change notification settings - Fork 90
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
Work out a new way to write integration tests #380
Conversation
cmd/examplar/main.go
Outdated
} | ||
|
||
paths := os.Args[2:] | ||
fmt.Println(paths) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## main #380 +/- ##
==========================================
+ Coverage 68.15% 68.40% +0.24%
==========================================
Files 74 77 +3
Lines 7367 7650 +283
==========================================
+ Hits 5021 5233 +212
- Misses 1679 1739 +60
- Partials 667 678 +11
Continue to review full report at Codecov.
|
defer db.Close() | ||
|
||
// query results wrapper | ||
jsonResult := func(t *testing.T, res *query.Result) []byte { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⏲️ This can be replaced by:
var buf bytes.Buffer
err = document.IteratorToJSONArray(&buf, res)
return buf.Bytes()
And possibly GitHub issues, when we'll have iterated enough on it :)
➡️ check the README for an extensive description of what it does and how it works.
To avoid messing with paths (the test template), it uses
embed
from Go 1.16. It can be an issue, and it could be fixed if needed.