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

Add unit tests framework #111

Merged
merged 8 commits into from Dec 18, 2020
Merged

Add unit tests framework #111

merged 8 commits into from Dec 18, 2020

Conversation

kreamkorokke
Copy link
Contributor

Things in this PR:
1: Changed LintContext from struct to interface, for implementing MockLintContext
2: Added MockLintContext which allows tests to customize the k8s objects that the tests depend on
3: Added some sample test cases to verify-container-capabilities check.
4: Fixed a bug within the above check (previous for matching reserved word "all" we did not specify ^ or $)

Copy link
Contributor

@viswajithiii viswajithiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! All comments are nits

internal/lintcontext/context.go Outdated Show resolved Hide resolved
internal/lintcontext/context.go Outdated Show resolved Hide resolved
internal/lintcontext/context.go Outdated Show resolved Hide resolved
internal/templates/templates_testutils.go Outdated Show resolved Hide resolved
internal/templates/templates_testutils.go Outdated Show resolved Hide resolved
@kreamkorokke kreamkorokke merged commit 0177d11 into main Dec 18, 2020
@kreamkorokke kreamkorokke deleted the add-unit-tests-framework branch December 18, 2020 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants