From ddbf9e63a37a9b30e8b25a3328beb0c3e8dd78a2 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 21 Apr 2017 16:28:34 +0300 Subject: Allow test runner to specify ssh key for gitno access --- 900-implements.yarn | 5 ++++- check | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/900-implements.yarn b/900-implements.yarn index 976e0ce..4fae633 100644 --- a/900-implements.yarn +++ b/900-implements.yarn @@ -30,8 +30,11 @@ IMPLEMENTS WHEN user runs Gitano (.*) address = os.environ['ADDRESS'] + sshkey = os.environ['SSH_KEY'] cmd = get_next_match() - argv = ['ssh', 'git@' + address] + cmd.split() + argv = [ + 'ssh', '-oIdentitiesOnly=yes', '-i', sshkey, 'git@' + address + ] + cmd.split() exit, out, err = cliapp.runcmd_unchecked(argv) vars['argv'] = argv vars['exit'] = int(exit) diff --git a/check b/check index ec672c9..fb96a7e 100755 --- a/check +++ b/check @@ -13,6 +13,7 @@ fi yarn --env "ADDRESS=$address" \ --env "PASSWORD_STORE_DIR=$PASSWORD_STORE_DIR" \ --env "PASS_HOME=$HOME" \ + --env "SSH_KEY=$SSH_KEY" \ --env "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" \ --shell python2 --shell-arg '' --shell-library lib.py \ - pieni.net.yarn 9*.yarn "$@" + "$@" -- cgit v1.2.1