Skip to content

Commit

Permalink
Add tests (now passing) from #38
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Nov 17, 2018
1 parent 6b4c590 commit f6c2109
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions detect_git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ func TestGitDetector(t *testing.T) {
Output string
}{
{"git@github.com:hashicorp/foo.git", "git::ssh://git@github.com/hashicorp/foo.git"},
{
"git@github.com:org/project.git?ref=test-branch",
"git::ssh://git@github.com/org/project.git?ref=test-branch",
},
{
"git@github.com:hashicorp/foo.git//bar",
"git::ssh://git@github.com/hashicorp/foo.git//bar",
Expand All @@ -18,6 +22,22 @@ func TestGitDetector(t *testing.T) {
"git@github.com:hashicorp/foo.git?foo=bar",
"git::ssh://git@github.com/hashicorp/foo.git?foo=bar",
},
{
"git@github.xyz.com:org/project.git",
"git::ssh://git@github.xyz.com/org/project.git",
},
{
"git@github.xyz.com:org/project.git?ref=test-branch",
"git::ssh://git@github.xyz.com/org/project.git?ref=test-branch",
},
{
"git@github.xyz.com:org/project.git//module/a",
"git::ssh://git@github.xyz.com/org/project.git//module/a",
},
{
"git@github.xyz.com:org/project.git//module/a?ref=test-branch",
"git::ssh://git@github.xyz.com/org/project.git//module/a?ref=test-branch",
},
}

pwd := "/pwd"
Expand Down

0 comments on commit f6c2109

Please sign in to comment.