cdk8s-core
cdk8s-core copied to clipboard
Unit testing utilities
We would like to offer utilities for unit testing in the cdk8s.Testing
class.
Here are some examples of useful assertions:
- Assert that a chart synthesizes a manifest with a specific API object of a specific kind and optionally:
apiVersion
, a subset of properties (or exact match) - assert count of API objects from a certain kind
- Assert that a chart synthesizes a manifest that matches a snapshot stored in a file (would be nice to make it easy to update the snapshot by e.g. setting an env. variable).
These functions should be testing-framework agnostic (and naturally jsii-able) so they can be used in all languages. If people want to create wrappers/plugins for specific frameworks, it should be easy to wrap these utilities.