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

(maint) Test YAML plans with BoltSpec #2682

Merged
merged 1 commit into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/bolt_spec/plans/mock_executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def report_bundled_content(_mode, _name); end

def report_apply(_statements, _resources); end

def report_yaml_plan(_plan); end

def publish_event(event)
if event[:type] == :message
unless @stub_out_message
Expand Down
5 changes: 5 additions & 0 deletions spec/bolt_spec/plan_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def modulepath
expect(result.value).to eq(nil)
end

it 'runs yaml plans' do
expect_out_message.with_params("I'm a YAML plan")
expect { run_plan('plans::yaml', {}) }.not_to raise_error
end

context 'with commands' do
let(:plan_name) { 'plans::command' }
let(:return_expects) { { command: 'echo hello', params: {} } }
Expand Down
2 changes: 2 additions & 0 deletions spec/fixtures/bolt_spec/plans/plans/yaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
steps:
- message: I'm a YAML plan