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: add integration test for variables and Sprig template funcs #47

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

smira
Copy link
Member

@smira smira commented Nov 18, 2019

This adds new integration test for variables of different kinds. As
working for the test I realized text/template is too limited to do
sometimes useful templating, so I pulled in popular (used in Helm) set
of template functions Sprig: http://masterminds.github.io/sprig/

Signed-off-by: Andrey Smirnov smirnov.andrey@gmail.com

@@ -54,4 +55,4 @@ frontend:

.PHONY: integration
integration: integration.test bldr
cd internal/pkg/integration && PATH="$$PWD/../../../out:$$PATH" integration.test -test.v
cd internal/pkg/integration && PATH="$$PWD/../../../out:$$PATH" integration.test -test.v -test.run $(RUN_TESTS)
Copy link
Member Author

@smira smira Nov 18, 2019

Choose a reason for hiding this comment

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

this allows to run subset of the tests, e.g.:

make integration RUN_TESTS=TestIntegration/variables/docker

Unit test name includes both test folder (variables) and runner type (docker), so we can limit the scope in a pretty efficient way.

This adds new integration test for variables of different kinds. As
working for the test I realized `text/template` is too limited to do
sometimes useful templating, so I pulled in popular (used in Helm) set
of template functions Sprig: http://masterminds.github.io/sprig/

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
@smira smira merged commit 7745285 into siderolabs:master Nov 20, 2019
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