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 integration test for Template Controller to check deletion #35

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

katronquillo
Copy link
Collaborator

No description provided.

Copy link
Contributor

github-actions bot commented Nov 1, 2024

⬆️ Go test coverage increased from 70.9% to 71.2% compared to 4013642 (1 ignored files)
⚠️ 2 of 12 packages have zero coverage.
  • kumquat
  • kumquat/cmd

Updated Package Coverages:

# Package Name                |  Prior |    New
+ kumquat/internal/controller |  71.7% |  72.4%
View coverage for all packages
# Package Name                | Coverage
- kumquat                     |     0.0%
+ kumquat/api/v1beta1         |   100.0%
- kumquat/cmd                 |     0.0%
+ kumquat/internal/controller |    72.4%
+ kumquat/renderer            |   100.0%
+ kumquat/renderer/cue        |    87.5%
+ kumquat/renderer/gotemplate |    95.8%
+ kumquat/renderer/jsonnet    |    87.9%
+ kumquat/repository          |    91.8%
+ kumquat/store               |    75.0%
+ kumquat/template            |    93.9%
+ kumquat/test/utils          |    10.8%

Copy link
Collaborator

@jamesdobson jamesdobson left a comment

Choose a reason for hiding this comment

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

Thanks for adding a test case!

internal/controller/template_controller_test.go Outdated Show resolved Hide resolved
internal/controller/template_controller_test.go Outdated Show resolved Hide resolved
// Apply all resources specified by the YAML files in the given directory, dir, as well as all sub-directories
// Ignores paths specified in excludePaths
func applyResourcesFromYAMLInDir(ctx context.Context, dir string, excludePaths []string) {
if excludePaths == nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't see this the first time, I haven't used the slices package much, but I think nil will just work as an empty slice, see: https://go.dev/play/p/o6KpQfftdPf

So hopefully you can remove this if block and it will still work.

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.

2 participants