зеркало из https://github.com/microsoft/rushstack.git
1a0cbdf34d
* 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. |
||
---|---|---|
.. | ||
config | ||
s3data/rush-build-cache | ||
src | ||
.eslintrc.js | ||
.gitignore | ||
README.md | ||
docker-compose.yml | ||
package.json | ||
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