Skip to content

Commit

Permalink
Improve tests off the back of the changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CerealBoy committed Aug 23, 2024
1 parent 2004070 commit 1973a1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/sources/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ func TestGetRefsEmptyResponse(t *testing.T) {
defer ctrl.Finish()

s3mock := NewMockS3API(ctrl)
s3mock.EXPECT().ListObjectsV2(gomock.Any()).Times(1).Return(&s3.ListObjectsV2Output{}, nil)
s3mock.EXPECT().ListObjectsV2(gomock.Any()).Times(1).Return(&s3.ListObjectsV2Output{
CommonPrefixes: []*s3.CommonPrefix{},
IsTruncated: aws.Bool(false),
}, nil)

assert.NotPanics(func() {
s := &S3{Bucket: "bucket", Path: "/", s3: s3mock}
Expand All @@ -106,6 +109,7 @@ func TestGetRefsBasicResponse(t *testing.T) {
Prefix: aws.String("prefix/"),
},
},
IsTruncated: aws.Bool(false),
}, nil)

assert.NotPanics(func() {
Expand Down

0 comments on commit 1973a1c

Please sign in to comment.