Skip to content

Commit e30967d

Browse files
committed
Use the hostname localhost for http tests
When the network is disabled connecting to the hostname returned by the hostname command is not always possible.
1 parent c285514 commit e30967d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/xrdhttp-setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fi
106106

107107
# Create the host certificate request
108108
openssl genrsa -out "$XROOTD_CONFIGDIR/tls.key" 4096 >> "$BINARY_DIR/tests/$TEST_NAME/server.log"
109-
openssl req -new -key "$XROOTD_CONFIGDIR/tls.key" -config "$XROOTD_CONFIGDIR/tlsca.ini" -out "$XROOTD_CONFIGDIR/tls.csr" -outform PEM -subj "/CN=$(hostname)" 0<&- >> "$BINARY_DIR/tests/$TEST_NAME/server.log"
109+
openssl req -new -key "$XROOTD_CONFIGDIR/tls.key" -config "$XROOTD_CONFIGDIR/tlsca.ini" -out "$XROOTD_CONFIGDIR/tls.csr" -outform PEM -subj "/CN=localhost" 0<&- >> "$BINARY_DIR/tests/$TEST_NAME/server.log"
110110
if [ "$?" -ne 0 ]; then
111111
echo "Failed to generate host certificate request"
112112
exit 1
@@ -194,7 +194,7 @@ while [ -z "$XROOTD_URL" ]; do
194194
exit 1
195195
fi
196196
done
197-
XROOTD_URL="https://$(hostname):$XROOTD_URL/"
197+
XROOTD_URL="https://localhost:$XROOTD_URL/"
198198
echo "xrootd started at $XROOTD_URL"
199199

200200
XROOTD_HTTPSERVER_CONFIG="$XROOTD_CONFIGDIR/xrootd-httpserver.cfg"

0 commit comments

Comments
 (0)