Provisioning: unit test repository/github package (#104310)

* Add unit tests IsAuthenticated

* Add unit tests RepoExists

* Add unit tests GetContents

* Add initial unit tests GetTree

* Add unit tests for CreateFile

* Add unit test UpdateFile

* Add unit tests DeleteFile

* Add unit tests for Commits

* Add unit tests for helpers

* Add unit test CompareCommits

* Add GetBranch tests

* Add unit tests BranchExists and CreateBranch

* Add unit tests Webhooks

* Remove unused code

* Add unit tests CommentPullRequest

* Add more cases for GetTree

* Complete coverage

* Fix linting
This commit is contained in:
Roberto Jiménez Sánchez
2025-04-22 18:20:29 +01:00
committed by GitHub
parent 8ef8471b23
commit a438b192d3
8 changed files with 3877 additions and 279 deletions
@@ -100,8 +100,6 @@ type Client interface {
ListPullRequestFiles(ctx context.Context, owner, repository string, number int) ([]CommitFile, error)
CreatePullRequestComment(ctx context.Context, owner, repository string, number int, body string) error
CreatePullRequestFileComment(ctx context.Context, owner, repository string, number int, comment FileComment) error
ClearAllPullRequestFileComments(ctx context.Context, owner, repository string, number int) error
}
//go:generate mockery --name RepositoryContent --structname MockRepositoryContent --inpackage --filename mock_repository_content.go --with-expecter