Puppet Rspec:类尚未被评估

时间:2015-07-29 23:10:01

标签: rspec-puppet

我正在为puppet模块编写一个rspec测试,它会进行以下调用:

lookupvar('services::service')

当我运行测试时,我收到以下警告: Could not look up qualified variable 'services::service'; class services has not been evaluated

我可以通过在init.pp中包含 services 模块来解决此问题。但是,有没有办法从我的测试中要求服务模块,例如spec_helper.rb还是测试用例本身?

1 个答案:

答案 0 :(得分:0)

我最终将include ::services添加到spec / fixtures / manifests / site.pp