Unit testing I';我试图运行puppet rspec,但得到一个不太具体的错误

Unit testing I';我试图运行puppet rspec,但得到一个不太具体的错误,unit-testing,testing,rspec,puppet,Unit Testing,Testing,Rspec,Puppet,我正试图让rspec在我的Puppet模块上工作,但出现以下错误: 1) apache when called with no parameters on redhat Failure/Error: }) Puppet::Error: Could not parse for environment production: No file(s) found for import of '' at line 4 on node testhost.example.

我正试图让rspec在我的Puppet模块上工作,但出现以下错误:

  1) apache when called with no parameters on redhat
     Failure/Error: })
     Puppet::Error:
       Could not parse for environment production: No file(s) found for import of '' at line 4 on node testhost.example.com
     # ./spec/classes/apache_spec.rb:10:in `block (3 levels) in <top (required)>'
我确实有一个.fixtures.yml(modules/apache/.fixtures.yml):

有人能把我推向正确的方向吗?我可能错过了一些明显的东西…:

谢谢,
Ger。

我在fixtures中没有site.pp文件时也看到了类似的措辞错误,尽管我无法复制该问题。如果你还没有,让你的第一个规范只运行一次

it { should compile.with_all_deps }
…在编写任何附加测试之前。仅仅将工具设置为正常工作(并跟上变化)比编写测试要困难得多;测试是最简单的部分。 当您运行适当的rake任务时,.fixtures文件应该为您创建符号链接,但是如果没有,请确保您的模块在fixtures中是符号链接的,以及任何从属模块也是符号链接的


我喜欢puppetlabs_spec_helper和rspec puppet,尽管最终rake spec和rake rspec都可用,其中一个可能不太合适

PE3.2中的一些代码更改要求我在“rake规范”之前执行此操作

导出模块路径=/etc/puppetlabs/puppet/modules


多亏了PuppetLabs的Ben。

我(几乎)再次遇到了相同的错误:无法为环境生产解析:在节点testhost.example.com的第4行未找到用于导入“”的文件。符号链接已创建,并且spec/fixtures/manifests/site.pp中有一个空的site.pp谢谢!顺便说一句,我正在用PE3.2跑步。
fixtures:
  symlinks:
    "apache": "#{source_dir}"
it { should compile.with_all_deps }