Skip to content

Commit 5282b67

Browse files
committed
update test
1 parent 1f068ad commit 5282b67

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gitty/repository_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ func (m *mockError) GetContents(ctx context.Context, owner, repo, path string, o
113113
if path == testContentFail {
114114
return nil, testDownloadFailData, nil, nil
115115
}
116+
if ctx.Err() != nil {
117+
if errors.Is(ctx.Err(), context.Canceled) {
118+
return nil, nil, nil, context.Canceled
119+
}
120+
return nil, nil, nil, ErrTookTooLong
121+
}
116122
return nil, nil, nil, errMockContents
117123
}
118124

0 commit comments

Comments
 (0)