Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update scm tests
  • Loading branch information
ecrupper committed Apr 7, 2023
commit 059ea0ce57ea461416e19dfb43df7cad23842fb7
2 changes: 2 additions & 0 deletions scm/github/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,7 @@ func TestGithub_GetRepo(t *testing.T) {
want.SetClone("https://github.com/octocat/Hello-World.git")
want.SetBranch("master")
want.SetPrivate(false)
want.SetTopics([]string{"octocat", "atom", "electron", "api"})

client, _ := NewTest(s.URL)

Expand Down Expand Up @@ -1188,6 +1189,7 @@ func TestGithub_ListUserRepos(t *testing.T) {
r.SetClone("https://github.com/octocat/Hello-World.git")
r.SetBranch("master")
r.SetPrivate(false)
r.SetTopics([]string{"octocat", "atom", "electron", "api"})

want := []*library.Repo{r}

Expand Down
8 changes: 8 additions & 0 deletions scm/github/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ func TestGithub_ProcessWebhook_PullRequest(t *testing.T) {
wantRepo.SetClone("https://github.com/Codertocat/Hello-World.git")
wantRepo.SetBranch("master")
wantRepo.SetPrivate(false)
wantRepo.SetTopics(nil)

wantBuild := new(library.Build)
wantBuild.SetEvent("pull_request")
Expand Down Expand Up @@ -392,6 +393,7 @@ func TestGithub_ProcessWebhook_Deployment(t *testing.T) {
wantRepo.SetClone("https://github.com/Codertocat/Hello-World.git")
wantRepo.SetBranch("master")
wantRepo.SetPrivate(false)
wantRepo.SetTopics(nil)

wantBuild := new(library.Build)
wantBuild.SetEvent("deployment")
Expand Down Expand Up @@ -511,6 +513,7 @@ func TestGithub_ProcessWebhook_Deployment_Commit(t *testing.T) {
wantRepo.SetClone("https://github.com/Codertocat/Hello-World.git")
wantRepo.SetBranch("master")
wantRepo.SetPrivate(false)
wantRepo.SetTopics(nil)

wantBuild := new(library.Build)
wantBuild.SetEvent("deployment")
Expand Down Expand Up @@ -767,6 +770,7 @@ func TestGithub_ProcessWebhook_IssueComment_PR(t *testing.T) {
wantRepo.SetClone("https://github.com/Codertocat/Hello-World.git")
wantRepo.SetBranch("master")
wantRepo.SetPrivate(false)
wantRepo.SetTopics(nil)

wantBuild := new(library.Build)
wantBuild.SetEvent("comment")
Expand Down Expand Up @@ -843,6 +847,7 @@ func TestGithub_ProcessWebhook_IssueComment_Created(t *testing.T) {
wantRepo.SetClone("https://github.com/Codertocat/Hello-World.git")
wantRepo.SetBranch("master")
wantRepo.SetPrivate(false)
wantRepo.SetTopics(nil)

wantBuild := new(library.Build)
wantBuild.SetEvent("comment")
Expand Down Expand Up @@ -976,6 +981,7 @@ func TestGitHub_ProcessWebhook_RepositoryRename(t *testing.T) {
wantRepo.SetBranch("master")
wantRepo.SetPrivate(false)
wantRepo.SetPreviousName("Hello-Old-World")
wantRepo.SetTopics(nil)

want := &types.Webhook{
Comment: "",
Expand Down Expand Up @@ -1039,6 +1045,7 @@ func TestGitHub_ProcessWebhook_RepositoryArchived(t *testing.T) {
wantRepo.SetClone("https://octocoders.github.io/Codertocat/Hello-World.git")
wantRepo.SetBranch("master")
wantRepo.SetPrivate(false)
wantRepo.SetTopics(nil)

want := &types.Webhook{
Comment: "",
Expand Down Expand Up @@ -1166,6 +1173,7 @@ func TestGitHub_ProcessWebhook_Repository(t *testing.T) {
wantRepo.SetClone("https://octocoders.github.io/Codertocat/Hello-World.git")
wantRepo.SetBranch("master")
wantRepo.SetPrivate(false)
wantRepo.SetTopics(nil)

want := &types.Webhook{
Comment: "",
Expand Down