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

[feat]: Add testing bootstrap code for templates #1112

Open
uberspot opened this issue Jan 9, 2024 · 1 comment
Open

[feat]: Add testing bootstrap code for templates #1112

uberspot opened this issue Jan 9, 2024 · 1 comment
Labels
enhancement enhancement to an existing feature feature user_feedback_wanted this issue might use some user feedback

Comments

@uberspot
Copy link
Contributor

uberspot commented Jan 9, 2024

Description of the feature

Hey legends! :)

We were using kapitan and got a request from some devs writing templates in it for a nice/quick way of testing template code.
Testing functionality is easy with a test target for example, but testing cases that should fail is trickier if you want kapitan compile to still compile all targets.
Is anyone else doing something similar?
Otherwise it sounds like a feature we could add to kapitan to e.g. call pytest if a flag is passed before compiling but after creating the inventory internally (?).

Additional context

No response

@uberspot uberspot added enhancement enhancement to an existing feature feature user_feedback_wanted this issue might use some user feedback labels Jan 9, 2024
@MatteoVoges
Copy link
Contributor

We could also add a flag in the target allow_failure, so that the target doesn't require to compile. Then you would need to check for your expected result (compiled or not) afterwards.

Embedding pytest or another test framework would need much more library support, which includes interfaces, modularity and API interface instead of setting the argvector and calling main()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement to an existing feature feature user_feedback_wanted this issue might use some user feedback
Projects
None yet
Development

No branches or pull requests

2 participants