Skip to content

Commit 7dd5142

Browse files
committed
Minor code and comments tweaks
Using `defer` for the sake of being more idiomatic (and maybe slightly more reliable); plus, using the proper doc comment standards. Signed-off-by: Leandro Motta Barros <leandro@balena.io> Change-type: patch
1 parent 19a8c64 commit 7dd5142

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: integration/image/delta_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ var deltaTestCases = []struct {
282282
},
283283
}
284284

285-
// TestDeltaSizes checks if the sizes of generated deltas have not increased. In
285+
// TestDeltaSize checks if the sizes of generated deltas have not increased. In
286286
// other words, this test is designed to catch regressions in the delta sizes.
287287
//
288288
// The expected sizes (wantSize) were defined empirically so that they match
@@ -615,8 +615,8 @@ func ttrQueryDeltaSizeAsserting(ctx context.Context, t *testing.T, client apicli
615615

616616
tarRC, err := client.ImageSave(ctx, []string{ttrImageName(image)})
617617
assert.Assert(t, err)
618+
defer tarRC.Close()
618619
size := deltaSizeFromTar(t, tarRC)
619-
tarRC.Close()
620620
return size
621621
}
622622

0 commit comments

Comments
 (0)