-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #332 from pivotal-cf/fix/private-github-assets-dow…
…nload Fix/private GitHub assets download Nick and I looked at this together we ran the tests locally (release will also run these tests... so I don't want to wait)
- Loading branch information
Showing
7 changed files
with
358 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package component | ||
|
||
import ( | ||
"github.com/google/go-github/v40/github" | ||
Ω "github.com/onsi/gomega" | ||
"testing" | ||
) | ||
|
||
func TestInternal_deduplicateReleasesWithTheSameTagName(t *testing.T) { | ||
please := Ω.NewWithT(t) | ||
b := Bump{ | ||
Releases: []*github.RepositoryRelease{ | ||
{TagName: ptr("Y")}, | ||
{TagName: ptr("1")}, | ||
{TagName: ptr("2")}, | ||
{TagName: ptr("3")}, | ||
{TagName: ptr("3")}, | ||
{TagName: ptr("3")}, | ||
{TagName: ptr("X")}, | ||
{TagName: ptr("2")}, | ||
{TagName: ptr("4")}, | ||
{TagName: ptr("4")}, | ||
}, | ||
} | ||
b.deduplicateReleasesWithTheSameTagName() | ||
tags := make([]string, 0, len(b.Releases)) | ||
for _, r := range b.Releases { | ||
tags = append(tags, r.GetTagName()) | ||
} | ||
please.Expect(tags).To(Ω.Equal([]string{ | ||
"Y", | ||
"1", | ||
"2", | ||
"3", | ||
"X", | ||
"4", | ||
})) | ||
} | ||
|
||
func ptr[T any](v T) *T { return &v } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
203 changes: 0 additions & 203 deletions
203
internal/component/fakes_internal/github_new_request_doer.go
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.