Skip to content

Commit 6904bc0

Browse files
committed
Fix broken test
1 parent 9fa3c5c commit 6904bc0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/apis/coherence/v1/create_statefulset_coherencespec_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ package v1_test
99
import (
1010
coh "github.com/oracle/coherence-operator/pkg/apis/coherence/v1"
1111
corev1 "k8s.io/api/core/v1"
12+
"k8s.io/apimachinery/pkg/api/resource"
1213
"testing"
1314
)
1415

@@ -187,7 +188,7 @@ func TestCreateStatefulSetWithCoherenceSpecWithExcludeFromWKAFalse(t *testing.T)
187188

188189
func TestCreateStatefulSetWithCoherenceSpecWithTracingRatio(t *testing.T) {
189190

190-
ratio := "0.0005"
191+
ratio := resource.MustParse("0.0005")
191192
spec := coh.CoherenceResourceSpec{
192193
Coherence: &coh.CoherenceSpec{
193194
Tracing: &coh.CoherenceTracingSpec{
@@ -200,7 +201,7 @@ func TestCreateStatefulSetWithCoherenceSpecWithTracingRatio(t *testing.T) {
200201
deployment := createTestDeployment(spec)
201202
// Create expected StatefulSet
202203
stsExpected := createMinimalExpectedStatefulSet(deployment)
203-
addEnvVars(stsExpected, coh.ContainerNameCoherence, corev1.EnvVar{Name: coh.EnvVarCohTracingRatio, Value: ratio})
204+
addEnvVars(stsExpected, coh.ContainerNameCoherence, corev1.EnvVar{Name: coh.EnvVarCohTracingRatio, Value: "500u"})
204205

205206
// assert that the StatefulSet is as expected
206207
assertStatefulSetCreation(t, deployment, stsExpected)

0 commit comments

Comments
 (0)