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

Test helper functions without adding them to a template #21

Closed
helgi opened this issue Mar 21, 2018 · 3 comments
Closed

Test helper functions without adding them to a template #21

helgi opened this issue Mar 21, 2018 · 3 comments
Labels
Milestone

Comments

@helgi
Copy link

helgi commented Mar 21, 2018

Would be good being able to test the helper functions individually/isolated from the templates, still using the same kind of input of values and set tho.

@lrills lrills added the feature label Mar 23, 2018
@lrills
Copy link
Collaborator

lrills commented Mar 23, 2018

Sounds great to me! Would a assertion like below help?

- templateEqual:
    template: {{ toYaml (dict "a" "b" "c" "d") }}
    result: |
      a: b
      c: d

But this might need some hack to implement, maybe swap the templates of chart and render it again.

@lrills lrills added this to the 0.2.0 milestone Mar 23, 2018
@helgi
Copy link
Author

helgi commented Mar 23, 2018

Something like that would work for me by the looks of it. I mostly have functions I include and then a few API partials, similar to what you showed above.

For context, this specific chart I have only contains .tpl and no .yaml :)

jglick pushed a commit to jglick/helm-unittest that referenced this issue Jun 21, 2021
* Update README.md, to remove codecoverage badge as SonarSource badge is already available.
@lrills
Copy link
Collaborator

lrills commented Jun 22, 2021

Close due to archiving repository.

Sorry for not presenting so long. I've been working on another project and don't have time to for helm-unittest.
Please consider other working forks like quintush/helm-unittest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants