Skip to content

Conversation

@prenaissance
Copy link
Contributor

This PR adds etcd as a new module.

I've implemented a single-node initialization only. If anyone would benefit from a multi-node cluster testcontainer, please let me know through comments.

@netlify
Copy link

netlify bot commented May 18, 2025

Deploy Preview for testcontainers-node ready!

Name Link
🔨 Latest commit a9999c2
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-node/deploys/682b35827d5da700080ff27a
😎 Deploy Preview https://deploy-preview-1004--testcontainers-node.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cristianrgreco cristianrgreco added enhancement New feature or request minor Backward compatible functionality labels May 19, 2025
@prenaissance
Copy link
Contributor Author

Could we try a re-run on the failed jobs? I'll look for workarounds if this keeps failing on CI. Tested locally using act and npm run test:ci packages/modules/etcd:

image

image

@cristianrgreco
Copy link
Collaborator

cristianrgreco commented May 19, 2025

The test is failing because it took longer than 5s to download the etcd image. Probably if you locally remove the image you'll reproduce the timeout and test failure.

Increase the test timeout, for example as done here:

describe("KafkaContainer", { timeout: 240_000 }, () => {

@prenaissance
Copy link
Contributor Author

Thanks for the hint! With the image removed it took 13 seconds locally to run the spec. I set the timeout to 30 seconds, hopefully that works for the CI run.

@cristianrgreco cristianrgreco changed the title Add etcd module Add Etcd module May 19, 2025
@cristianrgreco cristianrgreco merged commit 1f68067 into testcontainers:main May 19, 2025
412 of 413 checks passed
@cristianrgreco
Copy link
Collaborator

@prenaissance Thanks for the contribution!

@cristianrgreco
Copy link
Collaborator

cristianrgreco commented May 21, 2025

@prenaissance I just realised the containers aren't exported from the index.ts https://github.com/testcontainers/testcontainers-node/blob/main/packages/modules/etcd/src/index.ts, e.g as done here: https://github.com/testcontainers/testcontainers-node/blob/main/packages/modules/cassandra/src/index.ts.

Please feel free to raise a PR to export them 🙂

@prenaissance
Copy link
Contributor Author

My bad! Omw to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor Backward compatible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants