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 a knob to allow tasks testing using ruby_task_helper #461

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

smortex
Copy link
Contributor

@smortex smortex commented Jan 27, 2022

The puppetlabs/ruby_task_helper module provide helpers to write testable
bolt tasks. For this to work, the tested module depends on a copy of the
ruby_task_helper module to be beside it: quoting ruby_task_helper's
documentation:

Make sure the task helper repo is checked out next to your module so
the relative requires work and you can write simple unit tests for the
methods of your task.

This commit test for a use_ruby_task_helper setting to create a
symlink before running the test suite. This link points to the fixture
directory where the appropriate version of ruby_task_helper will be
put according to what the .fixtures.yml file says in the module under
test.

The puppetlabs/ruby_task_helper module provide helpers to write testable
bolt tasks.  For this to work, the tested module depends on a copy of the
ruby_task_helper module to be beside it: quoting ruby_task_helper's
documentation:

> Make sure the task helper repo is checked out next to your module so
> the relative requires work and you can write simple unit tests for the
> methods of your task.

This commit test for a `use_ruby_task_helper` setting to create a
symlink before running the test suite.  This link points to the fixture
directory where the appropriate version of ruby_task_helper will be
put according to what the `.fixtures.yml` file says in the module under
test.
@david22swan david22swan merged commit fa6b6d2 into puppetlabs:main Jan 31, 2022
@smortex smortex deleted the ruby branch January 31, 2022 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants