-
Notifications
You must be signed in to change notification settings - Fork 123
CSPL-909: Add test cases to verify changes to CR spec are applied to clustered environments #287
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
Conversation
testenv.VerifyIndexerClusterPhase(deployment, testenvInstance, splcommon.PhaseUpdating, idxcName) | ||
|
||
// Verify Indexers go to ready state | ||
testenv.VerifyIndexerClusterPhase(deployment, testenvInstance, splcommon.PhaseReady, idxcName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use testenv.SingleSiteIndexersReady(deployment, testenvInstance)
instead.
// Verify CPU limits on Search Heads before updating the CR | ||
SearchHeadPodName := fmt.Sprintf(testenv.SearchHeadPod, deployment.GetName(), 0) | ||
testenv.VerifyCPULimits(deployment, testenvInstance.GetName(), SearchHeadPodName, defaultCPULimits) | ||
SearchHeadPodName = fmt.Sprintf(testenv.SearchHeadPod, deployment.GetName(), 1) | ||
testenv.VerifyCPULimits(deployment, testenvInstance.GetName(), SearchHeadPodName, defaultCPULimits) | ||
SearchHeadPodName = fmt.Sprintf(testenv.SearchHeadPod, deployment.GetName(), 2) | ||
testenv.VerifyCPULimits(deployment, testenvInstance.GetName(), SearchHeadPodName, defaultCPULimits) | ||
|
||
// Change CPU limits to trigger CR update | ||
shc := &enterprisev1.SearchHeadCluster{} | ||
instanceName := fmt.Sprintf("%s-shc", deployment.GetName()) | ||
err = deployment.GetInstance(instanceName, shc) | ||
if err != nil { | ||
testenvInstance.Log.Error(err, "Unable to fetch Search Head Cluster deployment") | ||
} | ||
|
||
shc.Spec.Resources.Limits = corev1.ResourceList{ | ||
"cpu": resource.MustParse(newCPULimits), | ||
} | ||
err = deployment.UpdateCR(shc) | ||
Expect(err).To(Succeed(), "Unable to deploy Search Head Cluster with updated CR") | ||
|
||
// Verify Search Head Cluster is updating | ||
testenv.VerifySearchHeadClusterPhase(deployment, testenvInstance, splcommon.PhaseUpdating) | ||
|
||
// Verify Search Head go to ready state | ||
testenv.SearchHeadClusterReady(deployment, testenvInstance) | ||
|
||
// Verify CPU limits after updating the CR | ||
SearchHeadPodName = fmt.Sprintf(testenv.SearchHeadPod, deployment.GetName(), 0) | ||
testenv.VerifyCPULimits(deployment, testenvInstance.GetName(), SearchHeadPodName, newCPULimits) | ||
SearchHeadPodName = fmt.Sprintf(testenv.SearchHeadPod, deployment.GetName(), 1) | ||
testenv.VerifyCPULimits(deployment, testenvInstance.GetName(), SearchHeadPodName, newCPULimits) | ||
SearchHeadPodName = fmt.Sprintf(testenv.SearchHeadPod, deployment.GetName(), 2) | ||
testenv.VerifyCPULimits(deployment, testenvInstance.GetName(), SearchHeadPodName, newCPULimits) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not need to repeat this here as SHC update is already covered in C3 deployment. This is just to ensure test cases get executed in resonable time.
}) | ||
}) | ||
|
||
Context("Multisite cluster deployment (M13 - Multisite indexer cluster, Search head cluster)", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change deployment type to M4.
Test to verify changes to CR spec are applied to the pod, for Indexer and SH clusters environments
SVA Covered:
Test Scenario:
Test Run