1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-04 03:11:55 +02:00

test: add more url tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2021-09-28 10:43:54 -03:00
parent 8881328041
commit 7b44f8da7f
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -35,6 +35,7 @@ func TestExtractRepoFromURL(t *testing.T) {
for _, url := range []string{
"git@github.com:goreleaser/goreleaser.git",
"git@custom:goreleaser/goreleaser.git",
"https://foo@github.com/goreleaser/goreleaser",
"https://github.com/goreleaser/goreleaser.git",
"https://github.enterprise.com/goreleaser/goreleaser.git",
"https://gitlab-ci-token:SOME_TOKEN@gitlab.yourcompany.com/goreleaser/goreleaser.git",
@ -50,6 +51,7 @@ func TestExtractRepoFromURL(t *testing.T) {
for _, url := range []string{
"git@custom:group/nested/goreleaser/goreleaser.git",
"https://gitlab.mycompany.com/group/nested/goreleaser/goreleaser.git",
"https://gitlab-ci-token:SOME_TOKEN@gitlab.yourcompany.com/group/nested/goreleaser/goreleaser.git",
} {
t.Run(url, func(t *testing.T) {
repo, err := git.ExtractRepoFromURL(url)