[ARVADOS] updated: 2.1.0-757-gd3e236828

Git user git at public.arvados.org
Wed May 5 13:31:41 UTC 2021

Summary of changes:
 lib/controller/localdb/login_ldap_docker_test.sh | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

       via  d3e236828617b778237b7ac9c91c62a25263e5c4 (commit)
      from  1e8c4139c36848e673bc7e517c93bc238f101054 (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 d3e236828617b778237b7ac9c91c62a25263e5c4
Author: Tom Clegg <tom at curii.com>
Date:   Wed May 5 09:29:35 2021 -0400

    Fix "docker port" usage.
    "docker port foo tcp/9999" can return multiple addresses like
    No issue #
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/controller/localdb/login_ldap_docker_test.sh b/lib/controller/localdb/login_ldap_docker_test.sh
index 0225f2046..43f2ec0d7 100755
--- a/lib/controller/localdb/login_ldap_docker_test.sh
+++ b/lib/controller/localdb/login_ldap_docker_test.sh
@@ -62,8 +62,8 @@ docker run --rm --detach \
        --name=${ldapctr} \
 docker logs --follow ${ldapctr} 2>$debug >$debug &
-ldaphostport=$(docker port ${ldapctr} 389/tcp)
+ldaphostports=$(docker port ${ldapctr} 389/tcp)
 passwordhash="$(docker exec -i ${ldapctr} slappasswd -s "secret")"
@@ -191,11 +191,12 @@ docker run --detach --rm --name=${ctrlctr} \
        debian:10 \
        bash -c "${setup_pam_ldap:-true} && arvados-server controller"
 docker logs --follow ${ctrlctr} 2>$debug >$debug &
-ctrlhostport=$(docker port ${ctrlctr} 9999/tcp)
+ctrlhostports=$(docker port ${ctrlctr} 9999/tcp)
 echo >&2 "Waiting for arvados controller to come up..."
 for f in $(seq 1 20); do
-    if curl -s "http://${ctrlhostport}/arvados/v1/config" >/dev/null; then
+    if curl -s "${ctrlport}/arvados/v1/config" >/dev/null; then
         sleep 1
@@ -203,7 +204,7 @@ for f in $(seq 1 20); do
     echo -n >&2 .
 echo >&2
-echo >&2 "Arvados controller is up at http://${ctrlhostport}"
+echo >&2 "Arvados controller is up at${ctrlport}"
 check_contains() {
@@ -218,7 +219,7 @@ check_contains() {
 set +x
 echo >&2 "Testing authentication failure"
-resp="$(set -x; curl -s --include -d username=foo-bar -d password=nosecret "http://${ctrlhostport}/arvados/v1/users/authenticate" | tee $debug)"
+resp="$(set -x; curl -s --include -d username=foo-bar -d password=nosecret "${ctrlport}/arvados/v1/users/authenticate" | tee $debug)"
 check_contains "${resp}" "HTTP/1.1 401"
 if [[ "${config_method}" = ldap ]]; then
     check_contains "${resp}" '{"errors":["LDAP: Authentication failure (with username \"foo-bar\" and password)"]}'
@@ -227,7 +228,7 @@ else
 echo >&2 "Testing authentication success"
-resp="$(set -x; curl -s --include -d username=foo-bar -d password=secret "http://${ctrlhostport}/arvados/v1/users/authenticate" | tee $debug)"
+resp="$(set -x; curl -s --include -d username=foo-bar -d password=secret "${ctrlport}/arvados/v1/users/authenticate" | tee $debug)"
 check_contains "${resp}" "HTTP/1.1 200"
 check_contains "${resp}" '"api_token":"'
 check_contains "${resp}" '"scopes":["all"]'
@@ -240,7 +241,7 @@ uuid="${uuid%%\"*}"
 echo >&2 "New token is ${token}"
-resp="$(set -x; curl -s --include -H "Authorization: Bearer ${token}" "http://${ctrlhostport}/arvados/v1/users/current" | tee $debug)"
+resp="$(set -x; curl -s --include -H "Authorization: Bearer ${token}" "${ctrlport}/arvados/v1/users/current" | tee $debug)"
 check_contains "${resp}" "HTTP/1.1 200"
 if [[ "${config_method}" = ldap ]]; then
     # user fields come from LDAP attributes



More information about the arvados-commits mailing list