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

Additional testcontainer migrations #551

Closed
wants to merge 5 commits into from
Closed

Additional testcontainer migrations #551

wants to merge 5 commits into from

Conversation

andye2004
Copy link
Contributor

Hi @paulcwarren, I've migrated everything except GC, Elastic and Solr, I did want to get these done as well but my workload has exploded over the last couple of days and has limited my time considerably. Rather than holding off until I had completed things I've decided to open this PR in the interim.

I have added a Solr container and started to work on that but it occurred to me that the paulcwarren/solr (and possibly also the paulcwarren/elasticsearch:7.6.2) docker containers have specific set-up as the Solr test was failing with 404s on the URLs being used?

Anyway, the Solr container is there and I've commented on where we could do any specific set-up you currently have in the paulcwarren/solr, maybe with this in place and swapping the Solr client out and the tests will just run? I'll be happy to complete the TC migration process but will definitely need input from you on whatever specific config you have in place in those custom docker containers.

I also wanted to highlight something about the way I have done the test container implementations. Normally, there is no need to do things the way I have, all that is generally required is that we add an @Rule or @ClassRule to the JUnit tests but this wouldn't work as the Ginkgo4jSpringRunner doesn't appear to call the TestRule.apply() method on any rules added to tests. I did meant to mention this to you previously and forgot.

Finally, I cleaned up a few bits of code, notable the scanning filters, they didn't appear to be working as the Spring autoconfiguration was still trying to instantiate connections to mongo when the tests were run. I have swapped those out for specific exclusions in the integration test Application classes and this does prevent the Spring autoconfig from kicking in.

@paulcwarren
Copy link
Owner

Hi Andy,

I added testcontainers for solr, elasticsearch and converted gcs to use in-memory storage.

Solr and elasticseach are both a little more complicated and cant just rely on executing commands in the container after the it has started. They both require text extraction to be configured. So, these ones take a little more time. For the time, it looks like my modified containers are compatible with testcontainers at least. So, ... a step in the right direction.

I also reverted some of the changes to pom.xml. Sadly, need to keep the services and env vars for the "examples" step for the time-being. This projects will also need to be converted to use test containers. (Side note: I need to remove the gettingstarted step are I dont think it is testing anything as that project uses release dependencies).

I messed up the commit and somehow submitted a new PR! So I merged it. Therefore, I will close this one. But thanks again for another great contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants