Skip to content

Commit

Permalink
dump splunk version during consistently check for search head cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
rlieberman-splunk committed Dec 13, 2024
1 parent 2d1f4a0 commit f620d4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions test/monitoring_console/manager_monitoring_console_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,17 +755,13 @@ var _ = Describe("Monitoring Console test", func() {
Expect(err).To(Succeed(), "Failed to get update Monitoring Console in Search Head Cluster CRD")

// Ensure Search Head Cluster go to Ready Phase
//testenv.SearchHeadClusterReady(ctx, deployment, testcaseEnvInst)
testenv.SearchHeadClusterReady(ctx, deployment, testcaseEnvInst)

// Verify MC is Ready and stays in ready state
// testenv.VerifyMonitoringConsoleReady(ctx, deployment, mcTwoName, mcTwo, testcaseEnvInst)

// ############################ VERIFICATION FOR MONITORING CONSOLE TWO POST SHC RECONFIG ###############################

// Adding a sleep so that SHC can come up correctly
testcaseEnvInst.Log.Info("Sleeping to allow SHC and MC to become ready")
time.Sleep(900 * time.Second)

// Check Cluster Manager in Monitoring Console Two Config Map
testcaseEnvInst.Log.Info("Verify Cluster Manager on Monitoring Console Two Config Map after SHC Reconfig")
testenv.VerifyPodsInMCConfigMap(ctx, deployment, testcaseEnvInst, []string{fmt.Sprintf(testenv.ClusterManagerServiceName, deployment.GetName())}, splcommon.ClusterManagerURL, mcTwoName, true)
Expand Down
2 changes: 1 addition & 1 deletion test/testenv/verificationutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ func SearchHeadClusterReady(ctx context.Context, deployment *Deployment, testenv
testenvInstance.Log.Info("Waiting for Search Head Cluster phase to be ready", "instance", shc.ObjectMeta.Name, "Phase", shc.Status.Phase)
DumpGetPods(testenvInstance.GetName())

DumpGetSplunkVersion(ctx, testenvInstance.GetName(), deployment, "-shc-")
return shc.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))

// In a steady state, we should stay in Ready and not flip-flop around
gomega.Consistently(func() enterpriseApi.Phase {
_ = deployment.GetInstance(ctx, deployment.GetName(), shc)
testenvInstance.Log.Info("Check for Consistency Search Head Cluster phase to be ready", "instance", shc.ObjectMeta.Name, "Phase", shc.Status.Phase)
DumpGetSplunkVersion(ctx, testenvInstance.GetName(), deployment, "-shc-")
return shc.Status.Phase
}, ConsistentDuration, ConsistentPollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))
}
Expand Down

0 comments on commit f620d4b

Please sign in to comment.