Closed camara-tech closed 8 years ago
Thanks for reporting. The beaker tests are the least tested portion. And this is a bug in the templates.
https://github.com/nwops/retrospec-templates/blob/master/acceptance_spec_test.retrospec.erb#L7
You can easily fix this by updating the templates if you have forked them. And then change the location where retrospec gets its templates from.
See https://github.com/nwops/retrospec-templates#configuration for more information.
However, I need more documentation around creating the templates but I assume the fix would look like this.
<%- if @type.type == :definition -%>
<%= @type.name %>{'some_value':
<%- @parameters.each do |k,v| -%>
<%- if v.nil? -%>
<%= "#{k} => 'place_value_here'," %>
<%- else -%>
<%= "##{k} => #{variable_value(v)}," %>
<%- end -%>
<%- end -%>
}
<%- else -%>
class { '<%= @type.name %>':
<%- @parameters.each do |k,v| -%>
<%- if v.nil? -%>
<%= "#{k} => 'place_value_here'," %>
<%- else -%>
<%= "##{k} => #{variable_value(v)}," %>
<%- end -%>
<%- end -%>
}
<%- end -%>
If you want to try this and and make a MR against the retrospec-templates repository that would be great.
When generating the beaker tests for a module, all of the user defined resources are called using
rather than
This causes Puppet to return an AST error for those tests.