Remove test that can panic

This commit is contained in:
William Martin
2025-05-27 20:05:18 +02:00
parent d4a0764ddb
commit 11ea4e271d
2 changed files with 1 additions and 15 deletions
+1
View File
@@ -201,6 +201,7 @@ func RepositoryResourceContentsHandler(getClient GetClientFn) func(ctx context.C
}
}
// This should be unreachable because GetContents should return an error if neither file nor directory content is found.
return nil, errors.New("no repository resource content found")
}
}
-15
View File
@@ -180,21 +180,6 @@ func Test_repositoryResourceContentsHandler(t *testing.T) {
},
expectedResult: expectedDirContent,
},
{
name: "no data",
mockedClient: mock.NewMockedHTTPClient(
mock.WithRequestMatch(
mock.GetReposContentsByOwnerByRepoByPath,
),
),
requestArgs: map[string]any{
"owner": []string{"owner"},
"repo": []string{"repo"},
"path": []string{"src"},
},
expectedResult: nil,
expectError: "no repository resource content found",
},
{
name: "empty data",
mockedClient: mock.NewMockedHTTPClient(