misc: properly handle f.Close() defer

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
Hidde Beydals 2023-10-09 12:14:51 +02:00
parent 8d1c755dd1
commit 0288645875
No known key found for this signature in database
GPG Key ID: 979F380FC2341744
1 changed files with 1 additions and 1 deletions

View File

@ -1211,8 +1211,8 @@ func TestBucketReconciler_reconcileArtifact(t *testing.T) {
// path.
t.Expect(os.RemoveAll(dir)).ToNot(HaveOccurred())
f, err := os.Create(dir)
defer f.Close()
t.Expect(err).ToNot(HaveOccurred())
t.Expect(f.Close()).ToNot(HaveOccurred())
conditions.MarkReconciling(obj, meta.ProgressingReason, "foo")
conditions.MarkUnknown(obj, meta.ReadyCondition, "foo", "bar")
},