rushstack/build-tests/rush-amazon-s3-build-cache-...
Ian Clanton-Thuon 1a0cbdf34d
Deduplicate WebClient. (#5025)
* Add support for loading modules that only exist in async chunks.

* Use WebClient in the plugins.

* fixup! Use WebClient in the plugins.

* fixup! Use WebClient in the plugins.

* Remove node-fetch from rush-amazon-s3-build-cache-plugin.

* Rush change.

* fixup! Use WebClient in the plugins.

* fixup! Use WebClient in the plugins.

* Rush update.
2024-12-03 18:54:45 -08:00
..
config Use an internal node build rig for internal, non-cyclic projects. 2023-09-19 12:10:45 -07:00
s3data/rush-build-cache
src Deduplicate WebClient. (#5025) 2024-12-03 18:54:45 -08:00
.eslintrc.js Update local rigs to extend the local eslint config. 2023-09-26 01:23:09 -07:00
.gitignore
README.md warn user if 403 error when no credentials are set 2022-03-15 09:39:04 +01:00
docker-compose.yml Mitigate credscan issues. 2023-10-23 17:42:06 -07:00
package.json Deduplicate WebClient. (#5025) 2024-12-03 18:54:45 -08:00
tsconfig.json

README.md

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