testcontainers-minio
v0.0.1
Published
A Testcontainers implementation for Minio
Downloads
2
Maintainers
Readme
Testcontainers-Minio
A testcontainers for Minio
https://www.npmjs.com/package/testcontainers-minio
Integrate testcontainers of minio and minio-js
Installation
npm i -D testcontainers-minio
Usage
describe('Some tests using minio', () => {
let minioContainer: StartedMinioContainer
beforeAll(async () => {
// start a minio container
minioContainer = await new MinioContainer()
.withMinioRootUser('admin')
.withMinioRootPassword('adminPassword')
.start()
})
afterEach(async () => {
// you can use .getMinioClient() to get minio.Client instance
const minioClient = minioContainer.getMinioClient()
// remove 'bucket01' for example
await minioClient.removeBucket('bucket01')
})
// test cases ...
})