-
Notifications
You must be signed in to change notification settings - Fork 238
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 #205 from hashicorp/fix-go112-failures
Prevent test failures for invalid SCP-style URLs in go 1.12
- Loading branch information
Showing
3 changed files
with
8 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,12 +41,6 @@ func TestGitDetector(t *testing.T) { | |
"[email protected]:org/project.git//module/a?ref=test-branch", | ||
"git::ssh://[email protected]/org/project.git//module/a?ref=test-branch", | ||
}, | ||
{ | ||
// Using the scp-like form with the ssh:// prefix is invalid, so | ||
// it passes through as-is. | ||
"git::ssh://[email protected]:org/project.git", | ||
"git::ssh://[email protected]:org/project.git", | ||
}, | ||
{ | ||
// Already in the canonical form, so no rewriting required | ||
// When the ssh: protocol is used explicitly, we recognize it as | ||
|
@@ -61,7 +55,7 @@ func TestGitDetector(t *testing.T) { | |
f := new(GitDetector) | ||
ds := []Detector{f} | ||
for _, tc := range cases { | ||
t.Run(tc.Input, func (t *testing.T) { | ||
t.Run(tc.Input, func(t *testing.T) { | ||
output, err := Detect(tc.Input, pwd, ds) | ||
if err != nil { | ||
t.Fatalf("unexpected error: %s", err) | ||
|
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