48 lines
1.9 KiB
Markdown
48 lines
1.9 KiB
Markdown
# @suaveplan/testing-integration-garage-s3 - Garage S3 v2.0.0 testcontainers fixture for @suaveplan/testing-integration
|
|
|
|
## Summary
|
|
|
|
Garage S3 v2.0.0 testcontainers fixture for `@suaveplan/testing-integration`.
|
|
|
|
Implements `ServiceFixture<GarageS3Config>` — manages a Garage container lifecycle including the 7-step init sequence (status, layout assign, layout apply, bucket create, key create, bucket allow, key info). Returns a plain S3 config; consumers bring their own `@aws-sdk/client-s3`.
|
|
|
|
<!-- begin:auto-docs -->
|
|
## Documentation tree
|
|
|
|
- [fixture](./src/fixture/garage-s3-fixture.md) — <!-- begin:auto-docs --> _(no submodules)_ <!-- end:auto-docs -->
|
|
- [garage-s3-fixture](./src/fixture/garage-s3-fixture.md) — <!-- begin:auto-docs --> _(no submodules)_ <!-- end:auto-docs -->
|
|
<!-- end:auto-docs --> - [garage-s3-fixture](./src/fixture/garage-s3-fixture.md) — <!-- begin:auto-docs --> _(no submodules)_- [garage-s3-fixture](./src/fixture/garage-s3-fixture.md) — <!-- begin:auto-docs --> _(no submodules)_- [garage-s3-fixture](./src/fixture/garage-s3-fixture.md) — <!-- begin:auto-docs --> _(no submodules)_- [garage-s3-fixture](./src/fixture/garage-s3-fixture.md) — <!-- begin:auto-docs --> _(no submodules)_
|
|
## Install
|
|
|
|
```bash
|
|
bun add -D @suaveplan/testing-integration-garage-s3
|
|
```
|
|
|
|
## Quick Start
|
|
|
|
```typescript
|
|
import { GarageS3Fixture } from "@suaveplan/testing-integration-garage-s3";
|
|
|
|
const fixture = new GarageS3Fixture();
|
|
const config = await fixture.start();
|
|
// config.endpoint, config.adminEndpoint, config.region, config.bucket
|
|
// config.accessKeyId, config.secretAccessKey
|
|
await fixture.stop();
|
|
```
|
|
|
|
## Env-bridge passthrough
|
|
|
|
Set all 4 env vars to skip container startup:
|
|
|
|
```text
|
|
GARAGE_S3_ENDPOINT=http://localhost:3900
|
|
GARAGE_S3_ADMIN_ENDPOINT=http://localhost:3902
|
|
GARAGE_S3_ACCESS_KEY_ID=your-key-id
|
|
GARAGE_S3_SECRET_ACCESS_KEY=your-secret
|
|
```
|
|
|
|
## Docs
|
|
|
|
- [GarageS3Fixture](src/fixture/garage-s3-fixture.md)
|
|
|