Skip to content

Commit 180ea5c

Browse files
committed
log error if sign-file fails
the error from the sign-file binary was getting lost because it wasn't returned through the stack call correctly. This commit fixes that by passing the message up. Also remove a couple of commented out code lines.
1 parent d5bfacd commit 180ea5c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

cmd/signimage/signimage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func processFile(filename string, header *tar.Header, tarreader io.Reader, data
210210
//sign it
211211
err = signFile(kmodsToSign[canonfilename], pubKeyFile, privKeyFile)
212212
if err != nil {
213-
return fmt.Errorf("error signing file %s", canonfilename)
213+
return fmt.Errorf("error signing file %s: %v", canonfilename, err)
214214
}
215215
logger.Info("Signed successfully", "kmod", canonfilename)
216216
return nil

internal/sign/job/signer_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ var _ = Describe("MakeJobTemplate", func() {
176176
}
177177
if imagePullSecret != nil {
178178
mod.Spec.ImageRepoSecret = imagePullSecret
179-
//expected.Spec.Template.Spec.Containers[0].Args = append(expected.Spec.Template.Spec.Containers[0].Args, "-secretdir")
180-
//expected.Spec.Template.Spec.Containers[0].Args = append(expected.Spec.Template.Spec.Containers[0].Args, "/docker_config/")
181179
expected.Spec.Template.Spec.Containers[0].VolumeMounts =
182180
append(expected.Spec.Template.Spec.Containers[0].VolumeMounts,
183181
v1.VolumeMount{

0 commit comments

Comments
 (0)