grafana / xk6-disruptor

Extension for injecting faults into k6 tests
https://k6.io/docs/javascript-api/xk6-disruptor/
GNU Affero General Public License v3.0
95 stars 7 forks source link

POC: Kubernetes integration tests #323

Closed pablochacin closed 1 year ago

pablochacin commented 1 year ago

Description

The kubernetes package offers helper functions that are used by the disruptors. Testing this package with the kubernetes client mock is insufficient due to its many limitations. The mock does not validate the objects submitted to the API, and it does not support the generation of events (required for example by watchers) in a reliable way.

This PR is a Proof of concept of using TestContainers for the kubernetes integration tests using the k3s module that allows spawning a fully functional kubernetes cluster running in a container.

Its main advantage with respect to the existing tests is the speed of spawning the Kubernetes cluster.

Checklist: