Skip to content

tests/converter: modify unpack testcase#614

Merged
imeoer merged 2 commits intocontainerd:mainfrom
SToPire:unpack-test
Oct 15, 2024
Merged

tests/converter: modify unpack testcase#614
imeoer merged 2 commits intocontainerd:mainfrom
SToPire:unpack-test

Conversation

@SToPire
Copy link
Copy Markdown
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.

@codecov
Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

SToPire commented Sep 1, 2024

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

Comment thread pkg/converter/tool/builder.go Outdated

if option.BackendConfigPath != "" {
args = append(args, "--backend-config", option.BackendConfigPath)
configFile, err := os.Open(option.BackendConfigPath)
Copy link
Copy Markdown
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.

Comment thread pkg/converter/tool/builder.go Outdated
return errors.Wrapf(err, "fail to marshal backend config %v", backendConfig)
}

logrus.Errorf("Backend config: %s", backendConfigBytes)
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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