@@ -249,10 +249,13 @@ integration_test() {
249
249
printf " \e[1m Integration test suite with APPEND_SLASH_FOR_POSSIBLE_DIRECTORY=%s\e[22m\n" " $4 "
250
250
printf " \033[34;1m▶\033[0m"
251
251
printf " \e[1m Integration test suite with STRIP_LEADING_DIRECTORY_PATH=%s\e[22m\n" " $5 "
252
+ printf " \033[34;1m▶\033[0m"
253
+ printf " \e[1m Integration test suite with PREFIX_LEADING_DIRECTORY_PATH=%s\e[22m\n" " $6 "
254
+
252
255
253
256
p " Starting Docker Compose Environment"
254
257
# COMPOSE_COMPATIBILITY=true Supports older style compose filenames with _ vs -
255
- COMPOSE_COMPATIBILITY=true AWS_SIGS_VERSION=$1 ALLOW_DIRECTORY_LIST=$2 PROVIDE_INDEX_PAGE=$3 APPEND_SLASH_FOR_POSSIBLE_DIRECTORY=$4 STRIP_LEADING_DIRECTORY_PATH=$5 compose up -d
258
+ COMPOSE_COMPATIBILITY=true AWS_SIGS_VERSION=$1 ALLOW_DIRECTORY_LIST=$2 PROVIDE_INDEX_PAGE=$3 APPEND_SLASH_FOR_POSSIBLE_DIRECTORY=$4 STRIP_LEADING_DIRECTORY_PATH=$5 PREFIX_LEADING_DIRECTORY_PATH= $6 compose up -d
256
259
257
260
if [ " ${wait_for_it_installed} " ]; then
258
261
if [ -x " ${wait_for_it_cmd} " ]; then
@@ -261,8 +264,8 @@ integration_test() {
261
264
fi
262
265
263
266
p " Starting HTTP API tests (v$1 signatures)"
264
- echo " test/integration/test_api.sh \" $test_server \" \" $test_dir \" $1 $2 $3 $4 $5 "
265
- bash " ${test_dir} /integration/test_api.sh" " ${test_server} " " ${test_dir} " " $1 " " $2 " " $3 " " $4 " " $5 " ;
267
+ echo " test/integration/test_api.sh \" $test_server \" \" $test_dir \" $1 $2 $3 $4 $5 $6 "
268
+ bash " ${test_dir} /integration/test_api.sh" " ${test_server} " " ${test_dir} " " $1 " " $2 " " $3 " " $4 " " $5 " " $6 " ;
266
269
267
270
# We check to see if NGINX is in fact using the correct version of AWS
268
271
# signatures as it was configured to do.
@@ -404,41 +407,52 @@ runUnitTestWithSessionToken "s3gateway_test.js"
404
407
integration_test_data
405
408
406
409
p " Testing API with AWS Signature V2 and allow directory listing off"
407
- integration_test 2 0 0 0 " "
410
+ integration_test 2 0 0 0 " " " "
408
411
409
412
compose stop nginx-s3-gateway # Restart with new config
410
413
411
414
p " Testing API with AWS Signature V2 and allow directory listing on"
412
- integration_test 2 1 0 0 " "
415
+ integration_test 2 1 0 0 " " " "
413
416
414
417
compose stop nginx-s3-gateway # Restart with new config
415
418
416
419
p " Testing API with AWS Signature V2 and static site on"
417
- integration_test 2 0 1 0 " "
420
+ integration_test 2 0 1 0 " " " "
418
421
419
422
compose stop nginx-s3-gateway # Restart with new config
420
423
421
424
p " Testing API with AWS Signature V2 and allow directory listing on and append slash and allow index"
422
- integration_test 2 1 1 1 " "
425
+ integration_test 2 1 1 1 " " " "
423
426
424
427
compose stop nginx-s3-gateway # Restart with new config
425
428
426
429
p " Test API with AWS Signature V4 and allow directory listing off"
427
- integration_test 4 0 0 0 " "
430
+ integration_test 4 0 0 0 " " " "
428
431
429
432
compose stop nginx-s3-gateway # Restart with new config
430
433
431
434
p " Test API with AWS Signature V4 and allow directory listing on and appending /"
432
- integration_test 4 1 0 1 " "
435
+ integration_test 4 1 0 1 " " " "
433
436
434
437
compose stop nginx-s3-gateway # Restart with new config
435
438
436
439
p " Test API with AWS Signature V4 and static site on appending /"
437
- integration_test 4 0 1 1 " "
440
+ integration_test 4 0 1 1 " " " "
438
441
439
442
compose stop nginx-s3-gateway # Restart with new config
440
443
441
444
p " Testing API with AWS Signature V2 and allow directory listing off and prefix stripping on"
442
- integration_test 2 0 0 0 /my-bucket
445
+ integration_test 2 0 0 0 /my-bucket " "
446
+
447
+ compose stop nginx-s3-gateway # Restart with new config
448
+
449
+ p " Test API with AWS Signature V4 and prefix leading directory path on"
450
+ integration_test 4 0 0 0 " " " /b"
451
+
452
+ p " Test API with AWS Signature V4 and prefix leading directory path on and prefix stripping on"
453
+ integration_test 4 0 0 0 " /tostrip" " /b"
454
+
455
+ p " Testing API with AWS Signature V2 and prefix leading directory path"
456
+ integration_test 2 0 0 0 " " " /b"
443
457
444
458
p " All integration tests complete"
0 commit comments