Skip to content
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: Add Firestore module #988

Merged
merged 9 commits into from
Sep 18, 2023
Merged

feat: Add Firestore module #988

merged 9 commits into from
Sep 18, 2023

Conversation

dejandjenic
Copy link
Contributor

What does this PR do?

Why is it important?

Related issues

@netlify
Copy link

netlify bot commented Sep 1, 2023

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 10ee846
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/6506a6db5915190008bbe5e3
😎 Deploy Preview https://deploy-preview-988--testcontainers-dotnet.netlify.app/modules
📱 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 site configuration.

Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your pull request. I have some requests. As soon as they are addressed, we can merge the module. Thanks.

Testcontainers.sln Outdated Show resolved Hide resolved
hooks/post-checkout Outdated Show resolved Hide resolved
src/Testcontainers.Firestore/FirestoreBuilder.cs Outdated Show resolved Hide resolved
src/Testcontainers.Firestore/FirestoreBuilder.cs Outdated Show resolved Hide resolved
src/Testcontainers.Firestore/FirestoreBuilder.cs Outdated Show resolved Hide resolved
src/Testcontainers.Firestore/FirestoreConfiguration.cs Outdated Show resolved Hide resolved
src/Testcontainers.Firestore/FirestoreContainer.cs Outdated Show resolved Hide resolved
@dejandjenic dejandjenic marked this pull request as ready for review September 4, 2023 09:57
@dejandjenic
Copy link
Contributor Author

i pushed new changes to resolve comments made to PR, i didn't resolve comments themselves unsure what are practices here. if required i can do that.

Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updating the pull request and addressing the requests. I made some minor adjustments, nothing significant. The pull request looks good 👍.

One thing I'd like to discuss is whether it makes sense to rename the module to "GCloud," similar to Java. This change would allow us to provide different container implementations, much like what Java does here. Additionally, should we renaming the container to FirestoreEmulatorContainer? This PR is related to #862 too.

@dejandjenic
Copy link
Contributor Author

I can do a push with renaming tommorow, gcloud naming is similar to java containers but dotnet containers have different setup. E. G. Azure is not single module. What ever you decide. I plan to push pubsub in aonther pr also

@HofmeisterAn
Copy link
Collaborator

Hmm, I think it depends on how often these containers may be used together and whether they share common configurations. @eddumelendez , based on your experience with Java, do you think it makes sense to publish them as separate modules or within a single one (the GCloud emulators)? Any opinion regarding the name (FirestoreContainer vs. FirestoreEmulatorContainer)?

@dejandjenic
Copy link
Contributor Author

basically they don't share configuration at all, for usage point it depends on what are you testing
e.g. in my company we use several levels of testing

if containers are used in unit test then responsibility of certain class is unlikely (should not) involve multiple concerns, repository, service ... should work with firestore or pubsub or bigquery ...
if containers are used for functional (integration) testing via testserver then at server setup it might need to setup entire infrastructure which could need setting multiple containers (here module approach would help)

IMHO i would stick to general testcontainers dotnet design which is one container per service, but this is up to you

on naming i would go with FirestoreContainer , we all know it is an emulator :-)

@eddumelendez
Copy link
Member

I think it depends on how often these containers may be used together and whether they share common configurations.

Testcontainers modules based on google-cloud-cli image don't share any config. They are group based on the concept of the GCP services.

The relationship between modules and implementation shouldn't be always 1:1. In the future, a confluentic module can be shared providing Testcontainers implementations for schema registry, kafka, ksqldb and others. The same for percona database which offers images for mysql, postgres

Feedback about this topic is welcome.

Any opinion regarding the name (FirestoreContainer vs. FirestoreEmulatorContainer)?

FirestoreContainer is ok 👍🏽

@HofmeisterAn HofmeisterAn changed the title implement firestore feat: Add Firestore module Sep 17, 2023
@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Sep 17, 2023
@HofmeisterAn HofmeisterAn merged commit 0c6588e into testcontainers:develop Sep 18, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants