Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b4155ea

Browse files
committedFeb 26, 2024
fix(testing): follow redirect when downloading ZK and use https
http mirror now redirects to https one
1 parent 4ed8a30 commit b4155ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎ensure-zookeeper-env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.4.14}
88
ZOOKEEPER_PATH="$ZOO_BASE_DIR/$ZOOKEEPER_VERSION"
99
ZOOKEEPER_PREFIX=${ZOOKEEPER_PREFIX}
1010
ZOOKEEPER_SUFFIX=${ZOOKEEPER_SUFFIX}
11-
ZOO_MIRROR_URL="http://archive.apache.org/dist"
11+
ZOO_MIRROR_URL="https://archive.apache.org/dist"
1212

1313

1414
function download_zookeeper(){
1515
mkdir -p $ZOO_BASE_DIR
1616
cd $ZOO_BASE_DIR
1717
ZOOKEEPER_DOWNLOAD_URL=${ZOO_MIRROR_URL}/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX}.tar.gz
1818
echo "Will download ZK from ${ZOOKEEPER_DOWNLOAD_URL}"
19-
(curl --silent -C - $ZOOKEEPER_DOWNLOAD_URL | tar -zx) || echo "Failed downloading ZK from ${ZOOKEEPER_DOWNLOAD_URL}"
19+
(curl --silent -L -C - $ZOOKEEPER_DOWNLOAD_URL | tar -zx) || (echo "Failed downloading ZK from ${ZOOKEEPER_DOWNLOAD_URL}" && exit 1)
2020
mv ${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX} $ZOOKEEPER_VERSION
2121
chmod a+x $ZOOKEEPER_PATH/bin/zkServer.sh
2222
}

0 commit comments

Comments
 (0)
Please sign in to comment.