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 with helm-unittest #1713

Open
renehernandez opened this issue Mar 8, 2021 · 10 comments
Open

Add integration with helm-unittest #1713

renehernandez opened this issue Mar 8, 2021 · 10 comments

Comments

@renehernandez
Copy link
Contributor

At work, we use helm-unittest plugin as part of our CI/CD pipelines.

It would be great if we could integrate the plugin natively into helmfile, e.g

releases:
  - name: release1
    namespace: default
    chart: .test-chart
    values:
      - ./values1.yaml
      - ./values2.yaml
    unit_tests:
       - ./tests

And this would automatically generate the final values file (like helmfile write-values does) and automatically invoke the helm unittest command.

@mumoshu
Copy link
Collaborator

mumoshu commented Mar 8, 2021

@renehernandez Good idea!

Just wondering but would you mind if I omitted the unit_tests field?

I think forcing the tests directory path to $CHART/tests and enabling the unittests only for local charts would make that field unneeded. WDYT?

@renehernandez
Copy link
Contributor Author

Just wondering but would you mind if I omitted the unit_tests field?

The purpose of having a unit_tests field would be to not force a particular structure to the user. In our case, we are considering having these unit tests next to each helmfile folder instead of on the chart since we are testing the merged output from helmfile instead of the default ones from the chart

@renehernandez
Copy link
Contributor Author

Also, is it necessary to differentiate between local and remote charts? I could see the possibility of testing that my values are assigned properly or that certain component is disabled against a remote chart

@renehernandez
Copy link
Contributor Author

@mumoshu A new helm-unittest has been published that brings the changes I need in order to work on this integration. I am going to start implementing this next week.

Coming back to your original feedback:

  • Make the unit_tests field optional. I would still like the possibility of allowing for customization of where the tests reside.
  • I am not sure where the default locations for the tests should be. I am more inclined to be in a folder next to the helmfile.yaml file since these tests would be driven by helmfile as opposed to the tests living on the chart folder that I tend to see them as being run by the helm command.

Thoughts?

@mumoshu
Copy link
Collaborator

mumoshu commented Apr 8, 2021

@renehernandez Hey!

the possibility of allowing for customization of where the tests reside

Makes sense 👍

I am not sure where the default locations for the tests should be

Me either, especially after reading your feedback. Can we just begin without the default location and forcing the user to provide the directories containing unittests?

@mumoshu
Copy link
Collaborator

mumoshu commented Apr 8, 2021

@renehernandez Can we use unittests or unitTests rather than unit_tests? I prefer the latter for consistency but if you find it ugly I think I can go with unittests. To maintain consistency, I've never intended to use anything other than lowerCamelCase in helmfile.yaml

@renehernandez
Copy link
Contributor Author

I'll carry on then!

@mathe-matician
Copy link

@mumoshu any thoughts on integrating this still?

@yxxhero
Copy link
Contributor

yxxhero commented Apr 6, 2024

@mathe-matician could you create an new issue at helmfile/helmfile repo? thanks so much.

@mathe-matician
Copy link

@yxxhero my mistake - I didn't realize I was on the old repo. Will do!

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

No branches or pull requests

4 participants