diff options
Diffstat (limited to 'integrations/git_helper_for_declarative_test.go')
-rw-r--r-- | integrations/git_helper_for_declarative_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/integrations/git_helper_for_declarative_test.go b/integrations/git_helper_for_declarative_test.go index 9da5c05f94..71473ce464 100644 --- a/integrations/git_helper_for_declarative_test.go +++ b/integrations/git_helper_for_declarative_test.go @@ -13,6 +13,7 @@ import ( "os" "path" "path/filepath" + "strconv" "strings" "testing" "time" @@ -55,7 +56,7 @@ func createSSHUrl(gitPath string, u *url.URL) *url.URL { u2 := *u u2.Scheme = "ssh" u2.User = url.User("git") - u2.Host = fmt.Sprintf("%s:%d", setting.SSH.ListenHost, setting.SSH.ListenPort) + u2.Host = net.JoinHostPort(setting.SSH.ListenHost, strconv.Itoa(setting.SSH.ListenPort)) u2.Path = gitPath return &u2 } |