From 8fb07c7e9ce9aeee616fa6c12310604ec8fc8855 Mon Sep 17 00:00:00 2001 From: Hansjoerg Maurer Date: Thu, 17 Sep 2026 10:22:12 +0200 Subject: [PATCH] Fix lint issues in architecture variant tests --- api/snapshot_test.go | 2 +- query/architecture_variant_test.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/snapshot_test.go b/api/snapshot_test.go index 02f8bca6..ded221ce 100644 --- a/api/snapshot_test.go +++ b/api/snapshot_test.go @@ -73,7 +73,7 @@ func (s *SnapshotsSuite) TestGetSnapshotsHandlesConcurrentDeletion(c *C) { // Pull must load the destination references before inferring architectures or // preserving existing packages. Both fixtures are ordinary amd64 packages. -func (_ *SnapshotsSuite) TestPullPreservesDestinationPackages(c *C) { +func (*SnapshotsSuite) TestPullPreservesDestinationPackages(c *C) { savedConfig, savedContext := utils.Config, context defer func() { utils.Config, context = savedConfig, savedContext }() dir := c.MkDir() diff --git a/query/architecture_variant_test.go b/query/architecture_variant_test.go index 2cbf9e18..ea5055dc 100644 --- a/query/architecture_variant_test.go +++ b/query/architecture_variant_test.go @@ -14,7 +14,11 @@ func TestArchitectureVariantQueries(t *testing.T) { if err != nil { t.Fatal(err) } - defer db.Close() + defer func() { + if err := db.Close(); err != nil { + t.Error(err) + } + }() collection := deb.NewPackageCollection(db) list := deb.NewPackageList() const normal = "test-package_1.0_amd64"