Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit testing utilities #35

Open
eladb opened this issue May 17, 2020 · 10 comments
Open

Unit testing utilities #35

eladb opened this issue May 17, 2020 · 10 comments
Labels
effort/large 1+ weeks feature-request New/Enhanced functionality wanted priority/p2 Dependent on community feedback. PR's are welcome :)

Comments

@eladb
Copy link
Contributor

eladb commented May 17, 2020

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.

@eladb eladb changed the title Testing utility Unit testing utilities May 17, 2020
@manparvesh
Copy link

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

@eladb
Copy link
Contributor Author

eladb commented Jun 11, 2020

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
Copy link

wuqunfei commented Oct 2, 2020

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.

@manparvesh manparvesh removed their assignment Oct 5, 2020
@eladb eladb removed their assignment Feb 25, 2021
@iliapolo iliapolo transferred this issue from cdk8s-team/cdk8s Jul 6, 2021
@iliapolo iliapolo added effort/large 1+ weeks feature-request New/Enhanced functionality wanted priority/p2 Dependent on community feedback. PR's are welcome :) labels Jul 6, 2021
@github-actions
Copy link

github-actions bot commented Sep 6, 2021

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 github-actions bot added the stale label Sep 6, 2021
@eladb eladb removed the stale label Sep 6, 2021
@github-actions
Copy link

github-actions bot commented Nov 6, 2021

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 github-actions bot added the stale label Nov 6, 2021
@github-actions
Copy link

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

@Hunter-Thompson
Copy link
Contributor

keep

@Hunter-Thompson
Copy link
Contributor

Can we reopen this issue? @eladb, @iliapolo

@eladb eladb reopened this Nov 30, 2021
@github-actions github-actions bot removed the stale label Dec 1, 2021
@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Jan 31, 2022
@Hunter-Thompson
Copy link
Contributor

keep

@github-actions github-actions bot removed the stale label Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/large 1+ weeks feature-request New/Enhanced functionality wanted priority/p2 Dependent on community feedback. PR's are welcome :)
Projects
None yet
Development

No branches or pull requests

5 participants