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

nydusify: fix unit test fail #1530

Merged
merged 3 commits into from
Dec 25, 2023
Merged

Conversation

Desiki-high
Copy link
Member

@Desiki-high Desiki-high commented Dec 25, 2023

Relevant Issue (if applicable)

utils_test.go:248:
                Error Trace:    /root/nydus/contrib/nydusify/pkg/utils/utils_test.go:248
                Error:          Should be true
                Test:           TestRetryWithHTTP

Details

  1. remove the use sudo in contrib-unit-test-coverage. sudo will change go env, and go vet will break.
  2. fix fix unit test error in utils_test.go with nydusify: refactor with http.ErrSchemeMismatch and syscall.ECONNREFUSED #1528.

Types of changes

What types of changes does your PullRequest introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@Desiki-high Desiki-high requested a review from a team as a code owner December 25, 2023 02:51
@Desiki-high Desiki-high requested review from jiangliu, ccx1024cc and changweige and removed request for a team December 25, 2023 02:51
utils_test.go:248:
                Error Trace:    /root/nydus/contrib/nydusify/pkg/utils/utils_test.go:248
                Error:          Should be true
                Test:           TestRetryWithHTTP

Signed-off-by: Yadong Ding <[email protected]>
@Desiki-high Desiki-high requested a review from a team as a code owner December 25, 2023 03:16
@Desiki-high Desiki-high requested review from liubin and removed request for a team December 25, 2023 03:16
Signed-off-by: Yadong Ding <[email protected]>
@Desiki-high Desiki-high marked this pull request as draft December 25, 2023 03:31
@Desiki-high Desiki-high changed the title nydusify: fix unit test fail in utils [WIP]nydusify: fix unit test fail in utils Dec 25, 2023
@Desiki-high Desiki-high marked this pull request as ready for review December 25, 2023 03:32
@Desiki-high Desiki-high changed the title [WIP]nydusify: fix unit test fail in utils [WIP]nydusify: fix unit test fail Dec 25, 2023
@Desiki-high Desiki-high force-pushed the fix-ci-contrib-ut branch 4 times, most recently from 0d3e36b to bbf7495 Compare December 25, 2023 05:40
`sudo` in action will change go env, remove sudo.
In runner user, we can create file in unpacktargz-test inseted of temp/unpacktargz-test,
so don't use os.CreateTemp in archive_test.go.

Signed-off-by: Yadong Ding <[email protected]>
@Desiki-high Desiki-high changed the title [WIP]nydusify: fix unit test fail nydusify: fix unit test fail Dec 25, 2023
Copy link

codecov bot commented Dec 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (65046b0) 60.90% compared to head (bd02185) 61.29%.
Report is 4 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1530      +/-   ##
==========================================
+ Coverage   60.90%   61.29%   +0.39%     
==========================================
  Files         141      145       +4     
  Lines       46265    46617     +352     
  Branches    44153    44153              
==========================================
+ Hits        28177    28575     +398     
+ Misses      16648    16591      -57     
- Partials     1440     1451      +11     
Files Coverage Δ
contrib/nydusify/pkg/packer/artifact.go 88.00% <100.00%> (+11.07%) ⬆️

... and 12 files with indirect coverage changes

Copy link
Collaborator

@imeoer imeoer left a comment

Choose a reason for hiding this comment

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

LGTM!

@imeoer imeoer merged commit 17c373f into dragonflyoss:master Dec 25, 2023
21 checks passed
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.

2 participants