mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 22:00:39 +00:00
test: enforce tenv usage in tests
This commit is contained in:
parent
20f5f050f3
commit
3fca6c0bf5
5 changed files with 8 additions and 11 deletions
|
@ -40,10 +40,10 @@ func withKeyFile(t *testing.T, keyname string, callback func(string)) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Setup ssh wrapper
|
||||
os.Setenv("GIT_SSH", path.Join(tmpDir, "ssh"))
|
||||
os.Setenv("GIT_SSH_COMMAND",
|
||||
t.Setenv("GIT_SSH", path.Join(tmpDir, "ssh"))
|
||||
t.Setenv("GIT_SSH_COMMAND",
|
||||
"ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -i \""+keyFile+"\"")
|
||||
os.Setenv("GIT_SSH_VARIANT", "ssh")
|
||||
t.Setenv("GIT_SSH_VARIANT", "ssh")
|
||||
|
||||
callback(keyFile)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue