CouchbaseContainer - Use the official Docker image to have the data samples in the cluster #4657
Replies: 3 comments 1 reply
-
@Cyrille-Dakhlia are you referring to being able to load the sample buckets like travel-sample, beer-sample etc? If so I had a change somewhere locally - if there is interest I can dust it up and bring it up as a PR. The CouchbaseContainer supports 7.0 but you need to create scopes and collections manually through the SDK management APIs at this point. I'm planning to add support for collections and scopes soon so that it's going to be even easier going forward. For the error message, can you show me the setup and SDK code you used so I can get a closer look? Also I'd like to know which SDK version you used exactly for a potential repro. |
Beta Was this translation helpful? Give feedback.
-
I am facing another issue,
|
Beta Was this translation helpful? Give feedback.
-
@Cyrille-Dakhlia-Zeenea would it be possible to enable debug logging and share those logs? The reason is I added timings to the individual phases and maybe that gives us a better clue where the time is spent. |
Beta Was this translation helpful? Give feedback.
-
Hi there! 👋
I have discovered
TestContainers
a few days ago as I am currently working with Couchbase and wanting to test my development, and I have found that there is a Couchbase module in here which is great news to me!I would like to run a CouchbaseContainer from the official Docker image to have all the data samples in it, but I am not quite sure how to do that. It looks like the following call does not use the official Couchbase Docker image by default:
public static CouchbaseContainer couchbaseContainer = new CouchbaseContainer("couchbase/server");
Am I missing something or is it intended that the cluster in the container is empty?
Another note:
I tried to retrieve a bucket that doesn't exist in the cluster, and to list its scopes, and I got the following error:
The cluster does not support collections and scopes. com.couchbase.client.core.error.FeatureNotAvailableException: The cluster does not support collections and scopes.
It seems to me that the error message is not correct since, when adding a bucket to the cluster, I can effectively retrieve its scopes, which means that the cluster does support that feature.
I don't know if it is intended as well, but it was misleading to me and I thought that probably
TestContainers
was actually not handling Scopes and Collections features as this feature is very new (July 2021 - version 7.0)Thanks in advance for any answers!
Kind regards,
Cyrille Dakhlia
Beta Was this translation helpful? Give feedback.
All reactions