Skip to content

Files

Latest commit

1a0cbdf · Dec 4, 2024

History

History

rush-amazon-s3-build-cache-plugin-integration-test

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Sep 19, 2023
Feb 3, 2022
Dec 4, 2024
Sep 26, 2023
Feb 23, 2022
Mar 15, 2022
Oct 24, 2023
Dec 4, 2024
Feb 3, 2022

About

This package enables integration testing of the AmazonS3Client by conncting to an acutal S3 endpoint created using an min.io docker image.

Prerequisites

Docker and docker compose must be installed

Start the S3 endpoint

In this folder run docker-compose up -d

Stop the S3 endpoint

In this folder run docker-compose down

Run the test

# start the docker container: docker-compose up -d
# build the code: rushx build
rushx read-s3-object

Testing retries

To test that requests can be retried start the proxy server which will fail every second request:

rushx start-proxy-server

Update the build-cache.json file:

{
  "cacheProvider": "amazon-s3",
  "amazonS3Configuration": {
    "s3Endpoint": "http://localhost:9002",
    "s3Region": "us-east-1",
    "s3Prefix": "rush-build-cache/test",
    "isCacheWriteAllowed": true
  }
}

Run the rush rebuild command

cd apps
cd rush
RUSH_BUILD_CACHE_CREDENTIAL="minio:minio123" node lib/start-dev.js --debug rebuild --verbose