-
Notifications
You must be signed in to change notification settings - Fork 546
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
fix: unit tests fail in windows #1003
Conversation
21fb725
to
71c2c01
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1003 +/- ##
===========================================
+ Coverage 82.52% 82.55% +0.03%
===========================================
Files 98 98
Lines 9962 9964 +2
===========================================
+ Hits 8221 8226 +5
+ Misses 1244 1242 -2
+ Partials 497 496 -1 ☔ View full report in Codecov by Sentry. |
@Skyenought 这个在 windows 下的哪个 case 会有问题? |
看下单测 https://github.com/cloudwego/hertz/actions/runs/6912348902/job/18823241892?pr=1004 |
@FGYFFFF 所有使用 router.StaticFile 的 case Lines 405 to 417 in 9c3f0b7
因为在单侧满足 if len(host) == 0 || bytes.Contains(uri, bytestr.StrColonSlashSlash) 的 |
40712fb
to
6a2943e
Compare
Good job! There has a few todos before merging. |
3dee6ef
to
4357aad
Compare
ee0a562
to
5723283
Compare
610be1e
to
f75f3b0
Compare
2450447
to
82114e8
Compare
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.
LGTM, thx~
cc @cloudwego/hertz-reviewers |
What type of PR is this?
fix
Check the PR title.
(Optional) Translate the PR title into Chinese.
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
zh(optional): 修复单元测试在 Windows 环境下失败的问题
在 windows 环境下, 文件路径一般形为 E:/gopath/f.go, 不为 unix 的 /gopath/f.go
该函数并没有考虑到 windows 的这种情况