solr-operator icon indicating copy to clipboard operation
solr-operator copied to clipboard

Introduce comprehensive integration tests

Open HoustonPutman opened this issue 3 years ago • 2 comments

Our unit tests are quite good for a wide variety of use cases, however operator interacts with external systems quite often now.

This includes (but is not limited to):

  • Creating ZK Nodes for SolrCloud chRoots.
  • Calling Solr APIs when dealing with SolrCollections, SolrCollectionAliases and SolrBackups.
  • The new way of upgrading solr pods in #133

These are all use cases that cannot be adequately tested in unit tests. Right now it's relatively easy for us to manually test changes to these parts of the operator, however this reliance on manual tests will not scale to the future when the operator has much more responsibility.

This issue is just to start the discussion, I haven't found any good frameworks to get this started with yet. Hopefully we can put our heads together and come up with something great! 😄

HoustonPutman avatar Aug 18 '20 15:08 HoustonPutman

Integration test would be awesome! We do a little bit now internally. I think I've seen TravisCI jobs for other projects using minikube. Perhaps we look at that and setup a harness that can spin up solrclouds and zk to test against. I'll poke around for some examples. Also, might be worth looking at other CI systems to see if they offer similar functionality

sepulworld avatar Aug 18 '20 16:08 sepulworld

example usage of minikube on travis

sepulworld avatar Aug 19 '20 05:08 sepulworld