-
-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Couchbase module #646
Add Couchbase module #646
Conversation
✅ Deploy Preview for testcontainers-node ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
constructor(startedTestContainer: StartedTestContainer, username: string, password: string) { | ||
super(startedTestContainer); | ||
this.mappedKvPort = startedTestContainer.getMappedPort(PORTS.KV_PORT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I was writing the redis module (#642), I also oriented on this style from mysql. But when I start testing it by restaring the container, it will fail, because the container gots new ports after restart. So I moved it to the getter function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you :)
} | ||
|
||
getConnectionString() { | ||
return `couchbase://${this.host}:${this.mappedKvPort}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use getMappedPort in the getter, to get actual port, also when container was restarted.
return `couchbase://${this.host}:${startedTestContainer.getMappedPort(PORTS.KV_PORT)}`;
1d74f63
to
22736c4
Compare
Hi @cristianrgreco could you please review? |
You might want to remove the |
55063d4
to
04f3c33
Compare
4f9a6bb
to
77d0d87
Compare
@cristianrgreco sorry for the forced-push. Could you please review again? 🙏 I removed .DS_Store and made couchbase as dev dependency as you did. |
Thanks @halilkaankarakoc. Looks like some tests are failing:
You cannot assume that the default network will be called testcontainers-node/packages/testcontainers/src/container-runtime/utils/resolve-host.ts Line 30 in 824cd8d
It may be enough to simply do |
No description provided.