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
201201 }
202202 }
203203
204+ // This should be unreachable because GetContents should return an error if neither file nor directory content is found.
204205 return nil , errors .New ("no repository resource content found" )
205206 }
206207}
Original file line number Diff line number Diff line change @@ -180,21 +180,6 @@ func Test_repositoryResourceContentsHandler(t *testing.T) {
180180 },
181181 expectedResult : expectedDirContent ,
182182 },
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- },
198183 {
199184 name : "empty data" ,
200185 mockedClient : mock .NewMockedHTTPClient (
You can’t perform that action at this time.
0 commit comments