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

tests/converter: modify unpack testcase #614

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Conversation

SToPire
Copy link
Contributor

@SToPire SToPire commented Sep 1, 2024

This patch modifies the unpack testcase to keep consistent with the new nydus-image unpack interface in nydus-image.

Copy link

codecov bot commented Sep 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.

Project coverage is 22.04%. Comparing base (067f6b2) to head (6964102).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
pkg/converter/tool/builder.go 0.00% 17 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #614      +/-   ##
==========================================
- Coverage   22.07%   22.04%   -0.04%     
==========================================
  Files         122      122              
  Lines       10768    10784      +16     
==========================================
  Hits         2377     2377              
- Misses       8070     8086      +16     
  Partials      321      321              
Files with missing lines Coverage Δ
pkg/converter/tool/builder.go 0.00% <0.00%> (ø)

@SToPire
Copy link
Contributor Author

SToPire commented Sep 1, 2024

The smoke test should work properly if this PR is applied.

@@ -305,7 +305,41 @@ func Unpack(option UnpackOption) error {
}

if option.BackendConfigPath != "" {
args = append(args, "--backend-config", option.BackendConfigPath)
configFile, err := os.Open(option.BackendConfigPath)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems the configFile not used.

return errors.Wrapf(err, "fail to marshal backend config %v", backendConfig)
}

logrus.Errorf("Backend config: %s", backendConfigBytes)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The backend config maybe contains secret data, we shouldn't print it.

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.

Thanks! others LGTM, should we create a new builder (nydus-image) release?

@SToPire
Copy link
Contributor Author

SToPire commented Sep 26, 2024

@imeoer The unpack testcase should pass as expected with this PR merged.

This patch modifies the unpack testcase to keep consistent with the
new `nydus-image unpack` interface in nydus-image.

Signed-off-by: Yifan Zhao <[email protected]>
The Go package `user` has a `Current` method that returns the current
user. We should use `user.Current().Username` instead of
`user.Current().Name` to get the current username. This patch fixes it.

Signed-off-by: Yifan Zhao <[email protected]>
@imeoer imeoer merged commit 306d2dd into containerd:main Oct 15, 2024
16 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