Skip to content

Commit cd5cb83

Browse files
committed
Resolve linting errors raised from golanci-lint v2 upgrades
1 parent 35ed8d5 commit cd5cb83

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

builder/azure/chroot/step_mount_device_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestStepMountDevice_Run(t *testing.T) {
2727
if err != nil {
2828
t.Fatalf("Unable to create a temporary directory: %q", err)
2929
}
30-
defer os.Remove(mountPath)
30+
defer func() { _ = os.Remove(mountPath) }()
3131

3232
step := &StepMountDevice{
3333
MountOptions: []string{"foo"},
@@ -89,7 +89,7 @@ func TestStepMountDevice_Run_LVMActive(t *testing.T) {
8989
if err != nil {
9090
t.Fatalf("Unable to create a temporary directory: %q", err)
9191
}
92-
defer os.Remove(mountPath)
92+
defer func() { _ = os.Remove(mountPath) }()
9393

9494
step := &StepMountDevice{
9595
MountOptions: []string{"nouuid"},
@@ -146,7 +146,7 @@ func TestStepMountDevice_CleanupFunc_Unmount(t *testing.T) {
146146
if err != nil {
147147
t.Fatalf("Unable to create a temporary directory: %q", err)
148148
}
149-
defer os.Remove(mountPath)
149+
defer func() { _ = os.Remove(mountPath) }()
150150

151151
step := &StepMountDevice{
152152
MountPath: mountPath,

0 commit comments

Comments
 (0)