-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
feat(scylladb): add scylladb provider #2919
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…rd-awareness 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.
Thanks for a PR @danielhe4rt, have done an initial review with some suggestions and questions for you.
@@ -0,0 +1,194 @@ | |||
package scylladb_test |
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.
Can we include a test using ssl? I think would be nice to have.
} | ||
|
||
// WithShardAwareness enable shard-awareness in the ScyllaDB container so you can use the `19042` port. | ||
func WithShardAwareness() testcontainers.CustomizeRequestOption { |
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.
scylladb starts both ports 9042 and 19042 by default. IMO we should expose a fn to get the mapped port for 19042 and omit this one.
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.
@danielhe4rt @eddumelendez I'm taking over the PR and adding the suggestions on top of the original PR.
I'd like to have this in the upcoming release.
Thanks all for your time here
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.
Ups, I noticed this PR is sent from the main
branch of the fork, so unfortunately I cannot contribute commits to it.
@danielhe4rt could you please address the above comments 🙏 ?
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.
Done! Sorry for the delay. Tomorrow I'll sync with @CodeLieutenant and finish it for good. Give us one more day @mdelapenya. We're also gonna stream it, so you can find us on twitch.tv/danielhe4rt.
Co-authored-by: Steven Hartland <[email protected]>
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.
@danielhe4rt thanks for your time in this PR, I added a few comments/suggestions in the review.
Could you address them 🙏 ?
Thank you in advance
modules/scylladb/scylladb_test.go
Outdated
}, nil | ||
} | ||
|
||
func getDynamoAlternatorClient(t *testing.T, c *scylladb.Container, port int) (*dynamodb.Client, error) { |
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.
suggestion: if the assertions in the calling tests are all the same (create a table using the client), you may want to merge them into this helper function, and name it assertCreateTable(t *testing.T)
. You could also merge the createTable
helper
What does this PR do?
Implements the Database ScyllaDB as a new provider.
Under the
ScyllaDBContainer
you will have the possibility of:Shard Awareness
port usingWithShardAwareness
;WithCommand
ConnectionHost
API Example
Why is it important?
ScyllaDB is a NoSQL Database that is being constantly used by big companies and acts as a Drop-in Replacement to
CassandraDB
andDynamoDB
.How to test this PR
Clone the repository and enter the
scylladb
module folder: