Skip to content

Commit f29e480

Browse files
author
igor.grzankowski
committed
Fix test case
1 parent 51a6342 commit f29e480

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/splunk/enterprise/clustermanager_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,8 +1437,8 @@ func TestIsClusterManagerReadyForUpgrade(t *testing.T) {
14371437
Spec: enterpriseApi.LicenseManagerSpec{
14381438
CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{
14391439
Spec: enterpriseApi.Spec{
1440-
ImagePullPolicy: "Always",
1441-
Image: "splunk/splunk:latest",
1440+
ImagePullPolicy: "Always",
1441+
Image: "splunk/splunk:latest",
14421442
TerminationGracePeriodSeconds: 20,
14431443
},
14441444
Volumes: []corev1.Volume{},
@@ -1478,8 +1478,8 @@ func TestIsClusterManagerReadyForUpgrade(t *testing.T) {
14781478
Spec: enterpriseApi.ClusterManagerSpec{
14791479
CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{
14801480
Spec: enterpriseApi.Spec{
1481-
ImagePullPolicy: "Always",
1482-
Image: "splunk/splunk:latest",
1481+
ImagePullPolicy: "Always",
1482+
Image: "splunk/splunk:latest",
14831483
TerminationGracePeriodSeconds: 20,
14841484
},
14851485
Volumes: []corev1.Volume{},

pkg/splunk/enterprise/configuration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ func TestSetPreStopLifecycleHandler(t *testing.T) {
17871787
t.Error("Expected Exec to be set, but it was nil")
17881788
}
17891789

1790-
expectedCommand := []string{"/bin/sh", "-c", "/opt/splunk/bin/splunk offline && /opt/splunk/bin/splunk stop"}
1790+
expectedCommand := []string{"/bin/sh", "-c", "/opt/splunk/bin/splunk", "offline", "&&", "/opt/splunk/bin/splunk", "stop"}
17911791
if !reflect.DeepEqual(podTemplateSpec.Spec.Containers[idx].Lifecycle.PreStop.Exec.Command, expectedCommand) {
17921792
t.Errorf("Expected command to be %v, but got %v", expectedCommand, podTemplateSpec.Spec.Containers[idx].Lifecycle.PreStop.Exec.Command)
17931793
}

0 commit comments

Comments
 (0)