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

Work out a new way to write integration tests #380

Merged
merged 10 commits into from
Apr 13, 2021
Merged

Conversation

jhchabran
Copy link
Collaborator

@jhchabran jhchabran commented Apr 9, 2021

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.

@jhchabran jhchabran changed the title Work a new way to write integration tests Work out a new way to write integration tests Apr 9, 2021
}

paths := os.Args[2:]
fmt.Println(paths)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍🏼

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

cmd/examplar/README.md Outdated Show resolved Hide resolved
cmd/examplar/README.md Outdated Show resolved Hide resolved
@asdine asdine added this to the v0.12.0 milestone Apr 12, 2021
@codecov-io
Copy link

codecov-io commented Apr 13, 2021

Codecov Report

Merging #380 (4bf9ede) into main (ade8778) will increase coverage by 0.24%.
The diff coverage is 62.57%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
cmd/examplar/main.go 3.03% <3.03%> (ø)
cmd/examplar/scanner.go 70.19% <70.19%> (ø)
cmd/examplar/examplar.go 97.05% <97.05%> (ø)
sql/parser/drop.go 55.17% <0.00%> (-7.69%) ⬇️
sql/parser/parser.go 81.65% <0.00%> (-2.19%) ⬇️
database/constraint.go 69.37% <0.00%> (-1.02%) ⬇️
database/catalog.go 81.08% <0.00%> (-0.88%) ⬇️
document/document.go 65.91% <0.00%> (-0.50%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ade8778...4bf9ede. Read the comment docs.

defer db.Close()

// query results wrapper
jsonResult := func(t *testing.T, res *query.Result) []byte {
Copy link
Collaborator

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()

@asdine
Copy link
Collaborator

asdine commented Apr 13, 2021

image

@asdine asdine merged commit ba41391 into chaisql:main Apr 13, 2021
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.

3 participants