summaryrefslogtreecommitdiff
path: root/testing/gitano-test-tool.in
diff options
context:
space:
mode:
Diffstat (limited to 'testing/gitano-test-tool.in')
-rw-r--r--testing/gitano-test-tool.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/gitano-test-tool.in b/testing/gitano-test-tool.in
index c931b6d..8436dd6 100644
--- a/testing/gitano-test-tool.in
+++ b/testing/gitano-test-tool.in
@@ -90,11 +90,12 @@ local function generate_exturl(user, key, repo)
local authkeys = load_auth(ssh_key_file("testinstance", "authorized_keys"))
local pubkey = (sio.open(ssh_key_file(user, key) .. ".pub", "r")):read("*l")
local authline = assert(authkeys[pubkey])
- local extfmt = "ext::env HOME=%s SSH_ORIGINAL_COMMAND=%s %s %s %s %s"
+ local extfmt = "ext::env HOME=%s SSH_CLIENT=%s SSH_ORIGINAL_COMMAND=%s %s %s %s %s"
local function esc(s)
return ((s:gsub("%%", "%%%%")):gsub(" ", "%% "))
end
return (extfmt):format(esc(user_home("testinstance")),
+ esc("10.0.0.1 1234"),
"%S% " .. esc(repo),
esc(gitano.config.lib_bin_path() .. "/gitano-auth"),
esc(authline.repopath),
@@ -156,7 +157,7 @@ function cmd_runcommand(user, key, ...)
local cmdline = {
gitano.config.lib_bin_path() .. "/gitano-auth",
authline.repopath, authline.user, authline.keyset,
- env = {HOME = user_home("testinstance")}
+ env = {HOME = user_home("testinstance"), SSH_CLIENT="10.0.0.1 1234"}
}
cmdline.env.SSH_ORIGINAL_COMMAND = esc_quote_all({...})
run_program(cmdline)