Skip to content

Commit 807381f

Browse files
committed
Fix tests of the ostree transport
... which I broke on 2022-03-16, and noone noticed. (The actual non-test code was, at least east as of today, buildable, so this does not prove that noone is using the code... but it's a hint in that direction.) Signed-off-by: Miloslav Trmač <[email protected]>
1 parent fa37116 commit 807381f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ostree/ostree_dest_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33

44
package ostree
55

6+
import (
7+
"github.com/containers/image/v5/internal/private"
8+
)
9+
610
var _ private.ImageDestination = (*ostreeImageDestination)(nil)

ostree/ostree_transport_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func TestNewReference(t *testing.T) {
134134
require.NoError(t, err, path)
135135
}
136136

137-
_, err = NewReference("busybox", tmpDir+"/thisparentdoesnotexist/something")
137+
_, err := NewReference("busybox", tmpDir+"/thisparentdoesnotexist/something")
138138
assert.Error(t, err)
139139
}
140140

@@ -239,7 +239,7 @@ func TestReferenceNewImage(t *testing.T) {
239239
func TestReferenceNewImageSource(t *testing.T) {
240240
ref, err := Transport.ParseReference("busybox")
241241
require.NoError(t, err)
242-
src, err = ref.NewImageSource(context.Background(), nil)
242+
src, err := ref.NewImageSource(context.Background(), nil)
243243
require.NoError(t, err)
244244
defer src.Close()
245245
}

0 commit comments

Comments
 (0)