-
Notifications
You must be signed in to change notification settings - Fork 97
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ 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
|
The smoke test should work properly if this PR is applied. |
pkg/converter/tool/builder.go
Outdated
@@ -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) |
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.
It seems the configFile
not used.
pkg/converter/tool/builder.go
Outdated
return errors.Wrapf(err, "fail to marshal backend config %v", backendConfig) | ||
} | ||
|
||
logrus.Errorf("Backend config: %s", backendConfigBytes) |
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.
The backend config maybe contains secret data, we shouldn't print it.
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.
Thanks! others LGTM, should we create a new builder (nydus-image) release?
608c7df
to
bc11b08
Compare
a75fc14
to
ab1fe00
Compare
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]>
This patch modifies the unpack testcase to keep consistent with the new
nydus-image unpack
interface in nydus-image.