TOOLS-4148 Convert test/qa-tests/jstests/import/fields.js to Go#951
Open
autarch wants to merge 1 commit into03-23-convert_test/qa-tests/jstests/import/decimal128.js_to_gofrom
Conversation
This was referenced Mar 23, 2026
Collaborator
Author
test/qa-tests/jstests/import/fields.js to Gotest/qa-tests/jstests/import/fields.js to Go
FGasper
approved these changes
Mar 25, 2026
Collaborator
FGasper
left a comment
There was a problem hiding this comment.
Just a few nits.
Thanks!
mongoimport/mongoimport_test.go
Outdated
| ) { | ||
| t.Helper() | ||
|
|
||
| comma := map[string]rune{ |
Collaborator
There was a problem hiding this comment.
suggest “separator” instead of calling a tab a comma.
| comma := map[string]rune{ | ||
| "csv": ',', | ||
| "tsv": '\t', | ||
| }[format] |
Collaborator
There was a problem hiding this comment.
Suggested change
| }[format] | |
| }[format] | |
| require.NotEmpty(t, separator, "%#q format needs separator", format) |
mongoimport/mongoimport_test.go
Outdated
| assert.Equal(t, "extra3", doc["field6"], "field6 should contain third extra value") | ||
| } | ||
|
|
||
| func writeCSVFile(t *testing.T, path string, comma rune, records [][]string) { |
Collaborator
There was a problem hiding this comment.
Suggest not calling a thing that creates TSV writeCSVFile.
Collaborator
Author
There was a problem hiding this comment.
Renamed to writeXSVFile
a14964c to
4effa81
Compare
4effa81 to
cb84c46
Compare
cb84c46 to
86146e5
Compare
c3598aa to
7001c73
Compare
86146e5 to
c38e130
Compare
2106629 to
f15c803
Compare
6de2ce2 to
68992ec
Compare
f15c803 to
1d13fae
Compare
68992ec to
e96d0a3
Compare
1d13fae to
fd1616a
Compare
fd1616a to
caace78
Compare
e96d0a3 to
02e7ab3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.