-
Notifications
You must be signed in to change notification settings - Fork 9
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
FS-857 Add parse XLSX file function for BOM service with unit tests covered #235
Conversation
131229f
to
a017fb3
Compare
…box#233) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## main #235 +/- ##
==========================================
+ Coverage 71.87% 72.40% +0.52%
==========================================
Files 36 37 +1
Lines 3549 3627 +78
==========================================
+ Hits 2551 2626 +75
- Misses 745 747 +2
- Partials 253 254 +1
Flags with carried forward coverage won't be shown. Click here to find out 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.
This is an impressive bit of work. I left a few comments that I'd like you to address, but nothing really show-stopping. Nice job!
This is marked as Needs Changes
because it shouldn't be in ServerService (as we discussed earlier). But I think you could lift-and-shift this code to a proxy service and it would be fine.
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.
Consider putting all the structs into a single file.
// which is the format of a file reading from the HTTP request. | ||
stat, err := file.Stat() | ||
if err != nil { | ||
fmt.Println(err) |
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.
you have a couple of better (IMO) options here. Consider t.Logf
, t.Fatalf
(better, I think) or require.NoError
(if you are familiar with github.com/stretchr/testify/require
.
BOM service PostBomXlsx API need a parse XLSX helper function.
Implementation for XLSX parse helper function.
wrote unit tests cover for the helper function.
testdata folder to hold all xlsx files for testing purpose.