[ARVADOS] updated: 1.1.1-52-g7d51b03
Git user
git at public.curoverse.com
Mon Dec 4 16:03:21 EST 2017
Summary of changes:
build/run-tests.sh | 10 +++++++---
sdk/python/tests/run_test_server.py | 15 ---------------
2 files changed, 7 insertions(+), 18 deletions(-)
via 7d51b030e06c4314ee596bfdd51f1d8ad4f5f992 (commit)
from f15c51d123da2db1deeeb0e76685cf17eb56e039 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 7d51b030e06c4314ee596bfdd51f1d8ad4f5f992
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Mon Dec 4 16:01:58 2017 -0500
11453: Fix self-signed cert in run-tests, dedup in sdk/python.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/build/run-tests.sh b/build/run-tests.sh
index 766ba8b..c6110f2 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -811,9 +811,13 @@ install_apiserver() {
mkdir -p "$WORKSPACE/services/api/tmp/pids"
cert="$WORKSPACE/services/api/tmp/self-signed"
- if ! [[ -e "$cert.key" ]]; then
- dir="$WORKSPACE/services/api/tmp"
- openssl req -new -x509 -nodes -out "$cert.pem" -keyout "$cert.key" -days 3650 -subj /CN=0.0.0.0 -extfile <(printf 'subjectAltName=DNS:127.0.0.1,DNS:localhost,DNS:::1')
+ if ! [[ -e "$cert.pem" ]]; then
+ (
+ dir="$WORKSPACE/services/api/tmp"
+ set -ex
+ openssl req -newkey rsa:2048 -nodes -subj '/C=US/ST=State/L=City/CN=0.0.0.0' -out "$cert.csr" -keyout "$cert.key" </dev/null
+ openssl x509 -req -in "$cert.csr" -signkey "$cert.key" -out "$cert.pem" -days 3650 -extfile <(printf 'subjectAltName=DNS:127.0.0.1,DNS:localhost,DNS:::1')
+ ) || return 1
fi
cd "$WORKSPACE/services/api" \
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index 57efb97..567b3b3 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -288,21 +288,6 @@ def run(leave_running_atexit=False):
if not os.path.exists('tmp/logs'):
os.makedirs('tmp/logs')
- if not os.path.exists('tmp/self-signed.pem'):
- # We assume here that either passenger reports its listening
- # address as https:/0.0.0.0:port/. If it reports "127.0.0.1"
- # then the certificate won't match the host and reset() will
- # fail certificate verification. If it reports "localhost",
- # clients (notably Python SDK's websocket client) might
- # resolve localhost as ::1 and then fail to connect.
- subprocess.check_call([
- 'openssl', 'req', '-new', '-x509', '-nodes',
- '-out', 'tmp/self-signed.pem',
- '-keyout', 'tmp/self-signed.key',
- '-days', '3650',
- '-subj', '/CN=0.0.0.0'],
- stdout=sys.stderr)
-
# Install the git repository fixtures.
gitdir = os.path.join(SERVICES_SRC_DIR, 'api', 'tmp', 'git')
gittarball = os.path.join(SERVICES_SRC_DIR, 'api', 'test', 'test.git.tar')
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list