On 23/10/17 22:29, Michael Watters wrote:
> Hello,
>
> Does anybody know how to make rspec-puppet work with modules that use
> custom types for class parameters? I am getting an error when I run
> spec tests such as follows.
>
> # Puppet::ParseError:
> # Expected parameter 'ensure' of 'Class[Logrotate]' to have
> type Logrotate::Ensurable, got String
>
> The Logrotate::Ensurable type is defined in the logrotate module which
> is listed in .fixtures.yml.
>
> As a workaround I can use an older version of the logrotate module which
> does not include custom types but I'd rather have our tests match the
> production environment.
>
It sounds like rspec-puppet does not initialize a complete environment
with all required modules on the modulepath.
Suggest filing an issue against rspec-puppet.
- henrik
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users+unsub...@googlegroups.com>.
On 23/10/17 22:29, Michael Watters wrote:
> Hello,
>
> Does anybody know how to make rspec-puppet work with modules that use
> custom types for class parameters? I am getting an error when I run
> spec tests such as follows.
>
> # Puppet::ParseError:
> # Expected parameter 'ensure' of 'Class[Logrotate]' to have
> type Logrotate::Ensurable, got String
>
> The Logrotate::Ensurable type is defined in the logrotate module which
> is listed in .fixtures.yml.
>
> As a workaround I can use an older version of the logrotate module which
> does not include custom types but I'd rather have our tests match the
> production environment.
>
It sounds like rspec-puppet does not initialize a complete environment
with all required modules on the modulepath.
Suggest filing an issue against rspec-puppet.
- henrik
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users+unsub...@googlegroups.com>.