jward-bw commented on a change in pull request #265:
URL: https://github.com/apache/solr-operator/pull/265#discussion_r622306087



##########
File path: controllers/solrcloud_controller_storage_test.go
##########
@@ -329,6 +449,58 @@ func TestEphemeralStorageWithSpecs(t *testing.T) {
                },
        }
 
+       testHostPathSpecs(t, g, instance)
+}
+
+func testHostPathSpecs(t *testing.T, g *gomega.GomegaWithT, instance 
*solr.SolrCloud) {
+
+       // Setup the Manager and Controller.  Wrap the Controller Reconcile 
function so it writes each request to a
+       // channel when it is finished.
+       mgr, err := manager.New(testCfg, manager.Options{})
+       g.Expect(err).NotTo(gomega.HaveOccurred())
+       testClient = mgr.GetClient()
+
+       solrCloudReconciler := &SolrCloudReconciler{
+               Client: testClient,
+               Log:    ctrl.Log.WithName("controllers").WithName("SolrCloud"),
+       }
+       newRec, requests := SetupTestReconcile(solrCloudReconciler)
+       g.Expect(solrCloudReconciler.SetupWithManagerAndReconciler(mgr, 
newRec)).NotTo(gomega.HaveOccurred())
+
+       stopMgr, mgrStopped := StartTestManager(mgr, g)
+
+       defer func() {
+               close(stopMgr)
+               mgrStopped.Wait()
+       }()
+
+       cleanupTest(g, instance.Namespace)
+
+       // Create the SolrCloud object and expect the Reconcile and StatefulSet 
to be created
+       err = testClient.Create(context.TODO(), instance)
+       g.Expect(err).NotTo(gomega.HaveOccurred())
+       defer testClient.Delete(context.TODO(), instance)
+       g.Eventually(requests, 
timeout).Should(gomega.Receive(gomega.Equal(expectedCloudRequest)))

Review comment:
       Ok thanks, I've been on repos before where they like to have everything 
in a single commit :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to