Unit Test, Integration Test and E2E Test for Operator

96 views
Skip to first unread message

Pavan Patharde

unread,
Aug 5, 2021, 12:46:21 AM8/5/21
to Operator Framework
Hi All,

I am building a go based operator which internally creates K8S objects native way as well as in some cases use Helm SDK as well.

Wanted to understand how the community is testing the operators in terms of Unit, Integration and E2E testing.
Explored the envTest which might be good for Integration/E2E test.

Thanks
Pavan

Juraci Paixão Kröhling

unread,
Aug 5, 2021, 3:44:41 AM8/5/21
to Pavan Patharde, Operator Framework
We have a good mix of the three (unit/integration/e2e) in the OpenTelemetry Operator. We have e2e tests using kuttl for end-user scenarios, envtests for the controllers, and unit tests for individual features. The good thing about kuttl is that the tests can serve as examples/documentation, making it easy for users to see what's the expected state of the cluster after they install a CR.


- Juraci



--
You received this message because you are subscribed to the Google Groups "Operator Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to operator-framew...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/operator-framework/6c1f0792-2bf4-4a5e-9066-facd7e028809n%40googlegroups.com.

Camila Macedo

unread,
Aug 6, 2021, 6:54:47 AM8/6/21
to Juraci Paixão Kröhling, Pavan Patharde, Operator Framework
Hi Pavan, 


I hope that helps you out. 

CAMILA MACEDO

SR. SOFTWARE ENGINEER 

RED HAT Operator framework

Red Hat UK

She / Her / Hers

IM: cmacedo





Pavan Patharde

unread,
Sep 3, 2021, 8:29:24 AM9/3/21
to Operator Framework
Thank you folks for giving some insight into testing the operator.
Reply all
Reply to author
Forward
0 new messages