diff --git a/pkg/storage/cassandra_dependencies_test.go b/pkg/storage/cassandra_dependencies_test.go index 4fcdf7ae73..17d07dd816 100644 --- a/pkg/storage/cassandra_dependencies_test.go +++ b/pkg/storage/cassandra_dependencies_test.go @@ -65,8 +65,8 @@ func TestCassandraDefaultPort(t *testing.T) { assert.Len(t, b[0].Spec.Template.Spec.Containers, 1) for _, e := range b[0].Spec.Template.Spec.Containers[0].Env { if e.Name == "CQLSH_PORT" { - foundValue := e.Value - assert.Equal(t, "9042", foundValue, "unexpected CQLSH_PORT environment var value") + assert.Equal(t, "9042", e.Value, "unexpected CQLSH_PORT environment var value") + return } } assert.Fail(t, "value for CQLSH_PORT environment var not found")