File tree Expand file tree Collapse file tree 2 files changed +1
-15
lines changed Expand file tree Collapse file tree 2 files changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ func RepositoryResourceContentsHandler(getClient GetClientFn) func(ctx context.C
201
201
}
202
202
}
203
203
204
+ // This should be unreachable because GetContents should return an error if neither file nor directory content is found.
204
205
return nil , errors .New ("no repository resource content found" )
205
206
}
206
207
}
Original file line number Diff line number Diff line change @@ -180,21 +180,6 @@ func Test_repositoryResourceContentsHandler(t *testing.T) {
180
180
},
181
181
expectedResult : expectedDirContent ,
182
182
},
183
- {
184
- name : "no data" ,
185
- mockedClient : mock .NewMockedHTTPClient (
186
- mock .WithRequestMatch (
187
- mock .GetReposContentsByOwnerByRepoByPath ,
188
- ),
189
- ),
190
- requestArgs : map [string ]any {
191
- "owner" : []string {"owner" },
192
- "repo" : []string {"repo" },
193
- "path" : []string {"src" },
194
- },
195
- expectedResult : nil ,
196
- expectError : "no repository resource content found" ,
197
- },
198
183
{
199
184
name : "empty data" ,
200
185
mockedClient : mock .NewMockedHTTPClient (
You can’t perform that action at this time.
0 commit comments