Skip to content

Commit 4008665

Browse files
fix test
1 parent 5ef59a2 commit 4008665

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

tests/download-multiple_test.go

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ func Test_askGen3ForFileInfo_withShepherd(t *testing.T) {
2222

2323
mockIndexd := mocks.NewMockDrsClient(mockCtrl)
2424

25-
// New behavior: tries GetObjectByHash first
26-
mockIndexd.EXPECT().
27-
GetObjectByHash(gomock.Any(), gomock.Any()).
28-
Return(nil, fmt.Errorf("not a hash"))
29-
3025
mockIndexd.EXPECT().
3126
GetObject(gomock.Any(), testGUID).
3227
Return(&drs.DRSObject{Id: testGUID, Name: testFileName, Size: testFileSize}, nil)
@@ -58,14 +53,10 @@ func Test_askGen3ForFileInfo_withShepherd_shepherdError(t *testing.T) {
5853

5954
mockIndexd := mocks.NewMockDrsClient(mockCtrl)
6055

61-
// New behavior: tries GetObjectByHash first
62-
mockIndexd.EXPECT().
63-
GetObjectByHash(gomock.Any(), gomock.Any()).
64-
Return(nil, fmt.Errorf("not a hash"))
65-
6656
mockIndexd.EXPECT().
6757
GetObject(gomock.Any(), testGUID).
68-
Return(nil, fmt.Errorf("Indexd error"))
58+
Return(nil, fmt.Errorf("Indexd error")).
59+
Times(2)
6960

7061
logger := sylogs.NewGen3Logger(nil, "", "test")
7162

@@ -100,11 +91,6 @@ func Test_askGen3ForFileInfo_noShepherd(t *testing.T) {
10091

10192
mockIndexd := mocks.NewMockDrsClient(mockCtrl)
10293

103-
// New behavior: tries GetObjectByHash first
104-
mockIndexd.EXPECT().
105-
GetObjectByHash(gomock.Any(), gomock.Any()).
106-
Return(nil, fmt.Errorf("not a hash"))
107-
10894
mockIndexd.EXPECT().
10995
GetObject(gomock.Any(), testGUID).
11096
Return(&drs.DRSObject{Id: testGUID, Name: testFileName, Size: testFileSize}, nil)

0 commit comments

Comments
 (0)