Mocking Python functions
This post shows how to mock one or more Python functions for unit testing.
This post shows how to mock one or more Python functions for unit testing.
Kyverno is a policy engine designed specifically for Kubernetes. It is based on validanting and mutating webhooks that intercept resources before they are created. This post will show how to troubleshoot Kyverno and it will dive into Kyverno resources when it seems that your policy is not applied.
Terraform language provides the for_each meta-argument to create many resources from a key-value data structure. However, if not used properly, the for_each meta-argument can produce unexpected results.
In Kubernetes the infrastructure that runs an application is described by some YAML manifests. While application source code is tested with additional code written almost always in the same language, manifest describing the architecture are almost never tested. It means that changes in the manifests affect immediately the infrastructure.
Infrastructure code is considered 100% code but often good software principle, like testing, are not applied. Apart from checking the correctness of code, testing documents how code should behave, as well. In this post I will show how to test a Terraform module using the Python module tftest along with the testing framework pytest.