Skip to content

Commit a65b15f

Browse files
committed
S3CSI-204: Fix lint and formatting issues
Check os.Setenv error return value (errcheck) and fix gofumpt formatting in creator.go. Issue: S3CSI-204
1 parent bea72a9 commit a65b15f

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

magefiles/e2e.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,9 @@ func (E2E) TLSAll() error {
477477
return fmt.Errorf("failed to get working directory: %v", err)
478478
}
479479
caCertPath := filepath.Join(wd, certsDir, "ca.crt")
480-
os.Setenv("AWS_CA_BUNDLE", caCertPath)
480+
if err := os.Setenv("AWS_CA_BUNDLE", caCertPath); err != nil {
481+
return fmt.Errorf("failed to set AWS_CA_BUNDLE: %v", err)
482+
}
481483

482484
// Run tests against HTTPS endpoint
483485
tlsEndpoint := fmt.Sprintf("https://%s:%d", tlsHostname, tlsPort)

pkg/podmounter/mppod/creator.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ func (c *Creator) configureTLS(volumes []corev1.Volume, volumeMounts []corev1.Vo
224224
Name: TLSInitContainerName,
225225
Image: c.config.TLS.InitImage,
226226
ImagePullPolicy: c.config.TLS.InitImagePullPolicy,
227-
Command: []string{"sh", "-c",
227+
Command: []string{
228+
"sh", "-c",
228229
"cp /etc/ssl/certs/ca-certificates.crt /shared-certs/ca-certificates.crt && cat /custom-ca/ca-bundle.crt >> /shared-certs/ca-certificates.crt",
229230
},
230231
VolumeMounts: []corev1.VolumeMount{

0 commit comments

Comments
 (0)