Skip to content

Commit 8048a38

Browse files
committed
Smoke tests improvements
1 parent 421db3c commit 8048a38

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

smoke-tests/test-autoreceive.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RECEIVER_TAG=foobar
1111
${NASEFA} auto-receive ${TEMPDIR} ${RECEIVER_TAG} some-tag some-other-tag &
1212
RECEIVE_PID=${!}
1313
log_debug "Started auto-receiver, PID: ${RECEIVE_PID}"
14+
trap "kill -9 ${RECEIVE_PID} || echo" EXIT
1415

1516
BUNDLE_NAME="send-autoreceive-test-$((RANDOM))"
1617
F1=theplague.png

smoke-tests/test-web-send-receive-whitespace.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,26 @@ source ${SCRIPT_DIR}/util.sh
1010
BUNDLE_NAME="web-send-receive-test-whitespace-$((RANDOM))"
1111
F1=README.md
1212
F1_WITH_SPACES="READ ME.md"
13+
F1_URL_ENCODED="READ%20ME.md"
1314

1415
# Create a file with spaces in name
1516
cp ${NASEFA_ROOT}/${F1} "${TEMPDIR}/${F1_WITH_SPACES}"
1617

1718

1819
PORT=8081
1920

20-
${NASEFA} web -bindAddr ":${PORT}" &
21+
${NASEFA} web -allowBundlesListing -bindAddr ":${PORT}" &
2122
WEB_PID=${!}
2223
log_debug "Started web, PID: ${WEB_PID}"
24+
trap "kill -9 ${WEB_PID} || echo" EXIT
2325

2426
${NASEFA} create -bundleName ${BUNDLE_NAME}
2527
log_debug "Bundle created: ${BUNDLE_NAME}"
2628

2729
curl -s -F "file1=@${TEMPDIR}/${F1_WITH_SPACES}" http://localhost:${PORT}/upload/${BUNDLE_NAME} >/dev/null || fail "Failed to upload files"
2830
log_debug "Uploaded 1 file with spaces"
2931

30-
curl -s "http://localhost:${PORT}/bundle/${BUNDLE_NAME}/${F1_WITH_SPACES}" > ${TEMPDIR}/${F1} || fail "Failed to download file"
32+
curl -s "http://localhost:${PORT}/bundle/${BUNDLE_NAME}/${F1_URL_ENCODED}" > ${TEMPDIR}/${F1} || fail "Failed to download file"
3133
log_debug "Downloaded 1 file (saved without spaces)"
3234

3335
kill ${WEB_PID}

smoke-tests/test-web-send-receive.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ F2=README.md
1313

1414
PORT=8081
1515

16-
${NASEFA} web -bindAddr ":${PORT}" &
16+
${NASEFA} web -allowBundlesListing -bindAddr ":${PORT}" &
1717
WEB_PID=${!}
1818
log_debug "Started web, PID: ${WEB_PID}"
19+
trap "kill -9 ${WEB_PID} || echo" EXIT
1920

2021
${NASEFA} create -bundleName ${BUNDLE_NAME}
2122
log_debug "Bundle created: ${BUNDLE_NAME}"

0 commit comments

Comments
 (0)