© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
P. MartinKubernetes Programming with Gohttps://doi.org/10.1007/978-1-4842-9026-2_12

12. Testing the Reconcile Loop

Philippe Martin1  
(1)
Blanquefort, France
 

The previous chapter described how to implement a simple, but complete, Reconcile function for an Operator reconciling a Custom Resource.

To test the Reconcile function you have written in the previous chapter, you will use ginkgo, which is a Testing Framework for Go; and the envtest package from the controller-runtime Library, which provides a Kubernetes environment for testing.

The envtest Package

The controller-runtime Library provides an envtest package. This package provides a Kubernetes environment ...

Get Kubernetes Programming with Go: Programming Kubernetes Clients and Operators Using Go and the Kubernetes API now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.