diff options
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/git_helper_for_declarative_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/integrations/git_helper_for_declarative_test.go b/integrations/git_helper_for_declarative_test.go index 572abe95a2..60c7c29f68 100644 --- a/integrations/git_helper_for_declarative_test.go +++ b/integrations/git_helper_for_declarative_test.go @@ -12,20 +12,20 @@ import ( "net/http" "net/url" "os" - "os/exec" "path/filepath" "testing" "time" "code.gitea.io/git" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/ssh" "github.com/Unknwon/com" "github.com/stretchr/testify/assert" ) func withKeyFile(t *testing.T, keyname string, callback func(string)) { keyFile := filepath.Join(setting.AppDataPath, keyname) - err := exec.Command("ssh-keygen", "-f", keyFile, "-t", "rsa", "-N", "").Run() + err := ssh.GenKeyPair(keyFile) assert.NoError(t, err) //Setup ssh wrapper |