Skip to content

Commit 9efa0b9

Browse files
committed
remove unused code
1 parent 83fc255 commit 9efa0b9

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

internal/validate/vsa/vsa_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,26 @@ OURRVjNQMk9ndDFDaVFHeGg1VXhUZytGc3c9PSJ9
109109
func TestUploadVSAAttestation(t *testing.T) {
110110
fakeAtt := &mockAttestation{}
111111
imageRef := "quay.io/test/image:tag"
112-
ctx := context.Background()
113112

114113
t.Run("calls provided uploader and returns result", func(t *testing.T) {
115114
uploaderCalled := false
116-
uploader := func(ctx context.Context, att oci.Signature, img string) (string, error) {
115+
uploader := func(att oci.Signature, img string) (string, error) {
117116
uploaderCalled = true
118117
assert.Equal(t, fakeAtt, att)
119118
assert.Equal(t, imageRef, img)
120119
return "digest123", nil
121120
}
122-
result, err := uploader(ctx, fakeAtt, imageRef)
121+
result, err := uploader(fakeAtt, imageRef)
123122
assert.NoError(t, err)
124123
assert.Equal(t, "digest123", result)
125124
assert.True(t, uploaderCalled)
126125
})
127126

128127
t.Run("propagates error from uploader", func(t *testing.T) {
129-
uploader := func(ctx context.Context, att oci.Signature, img string) (string, error) {
128+
uploader := func() (string, error) {
130129
return "", assert.AnError
131130
}
132-
result, err := uploader(ctx, fakeAtt, imageRef)
131+
result, err := uploader()
133132
assert.Error(t, err)
134133
assert.Equal(t, "", result)
135134
assert.Contains(t, err.Error(), assert.AnError.Error())

0 commit comments

Comments
 (0)