cdk8s-team / cdk8s-core

Define Kubernetes native apps and abstractions using object-oriented programming
Apache License 2.0
59 stars 25 forks source link

Unit testing utilities #35

Open eladb opened 4 years ago

eladb commented 4 years ago

We would like to offer utilities for unit testing in the cdk8s.Testing class.

Here are some examples of useful assertions:

  1. 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)
  2. assert count of API objects from a certain kind
  3. 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.

manparvesh commented 4 years ago

Hey @eladb can I work on this issue? I'm really interested in contributing to this project.

eladb commented 4 years ago

Yes, absolutely. You can find inspiration in the how the AWS CDK testing works and the @aws-cdk/assert module. I was wondering if perhaps we should actually write this as a general purpose JSON assertion library instead of cdk8s specific.

Would you be able to write a quick RFC that plots your plan for this so we will make sure we are on the same page?

wuqunfei commented 3 years ago

Is anyone can share detail implementation direction we can go? this feature and CDK pipeline feature can make difference between the helm and programming language. I am join to contriube on it.

github-actions[bot] commented 2 years ago

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.

github-actions[bot] commented 2 years ago

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.

github-actions[bot] commented 2 years ago

Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen.

Hunter-Thompson commented 2 years ago

keep

Hunter-Thompson commented 2 years ago

Can we reopen this issue? @eladb, @iliapolo

github-actions[bot] commented 2 years ago

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

Hunter-Thompson commented 2 years ago

keep