kubeflow / spark-operator

Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.
Apache License 2.0
2.8k stars 1.38k forks source link

[FEATURE] Add tests covering CRD validation and JSON serialisation #2284

Open Tom-Newton opened 4 weeks ago

Tom-Newton commented 4 weeks ago

Community Note

What is the outcome that you are trying to reach?

Avoid future bugs similar to what https://github.com/kubeflow/spark-operator/pull/2255 fixed.

Describe the solution you would like

https://github.com/kubeflow/spark-operator/blob/0c49569afb2382738aabfe6ddbf5fddc577a6681/internal/webhook/sparkapplication_defaulter_test.go achieved this but was a kind of strange way to implement it.

Describe alternatives you have considered

No tests - pretty sure we don't want that.

Additional context

This is coming from discussion during PR review https://github.com/kubeflow/spark-operator/pull/2255#discussion_r1805931993 and I don't want it to get lost.