Closed DimitriSteyaert closed 8 years ago
I think a recently template contribution broke this again. I'll check it out today.
I pushed an update to the templates #58 but I don't think that was your issue. Are you using the stock templates? Also do you have the output of running retrospec?
Is this a module? Are you able to share your parent directory structure.
Do you have internet access on that machine as the clone hook needs to go fetch the templates.
I am indeed using the stock templates. The only output I got was the one line "succesfully ran..."
I just did a gem install puppet-retrospec
and ran the command from inside a puppet module.
The full directory path from where I ran this command is /var/git/hosting_cluster/puppet/profiles/.
This machine also has full internet access.
I just released version 0.12.2 which addressed a few minor issues (notably the test matrix) and exception handling and a few other items. Give this new version a try and see if it fixes your issue. I think the exception handling will at least pinpoint the issue.
Hi, I indeed got more feedback after running the 'retrospec puppet' command, which again didn't generate anything for me. This is the output I got:
➜ profiles git:(development) retrospec puppet
remote: Counting objects: 4, done.
remote: Total 4 (delta 3), reused 3 (delta 3), pack-reused 1
Unpacking objects: 100% (4/4), done.
From https://github.com/nwops/retrospec-templates
488defb..6915796 master -> origin/master
Successfully ran hook: /root/.retrospec/repos/retrospec-puppet-templates/clone-hook
Updating 488defb..6915796
Fast-forward
providers/provider_template.rb.retrospec.erb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
undefined method `applications' for #<Puppet::Resource::TypeCollection:0x007ff344fc1a90>
Run this command in your module grep -rl 'applications'
My guess is that you are referencing the applications
somewhere in your code and retrospec tries to load that code and fails. So this could mean you have an error in your code somewhere.
Moreover, retrospec should fail better and let the user know there was a problem loading the code.
Also, I assume you are running 0.12.2 now?
Hi, I don't have a reference to applications in my code. The command grep -rl 'applications'
doesn't return anything.
gem list puppet-retrospec
*** LOCAL GEMS ***
puppet-retrospec (0.12.2)
My version is indeed correct, I ran the command retrospec puppet
again and now got the feedback:
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 10 (delta 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (10/10), done.
From https://github.com/nwops/retrospec-templates
6915796..53499e7 master -> origin/master
Successfully ran hook: /root/.retrospec/repos/retrospec-puppet-templates/clone-hook
Updating 6915796..53499e7
Fast-forward
acceptance/acceptance_spec_test.rb.retrospec.erb | 27 ++++++++++++++++++
classes/hostclass_spec.rb.retrospec.erb | 34 ++++++++++++++++++++++
defines/definition_spec.rb.retrospec.erb | 36 ++++++++++++++++++++++++
nodes/node_spec.rb.retrospec.erb | 28 ++++++++++++++++++
4 files changed, 125 insertions(+)
create mode 100644 acceptance/acceptance_spec_test.rb.retrospec.erb
create mode 100644 classes/hostclass_spec.rb.retrospec.erb
create mode 100644 defines/definition_spec.rb.retrospec.erb
create mode 100644 nodes/node_spec.rb.retrospec.erb
undefined method `applications' for #<Puppet::Resource::TypeCollection:0x007f18dddce5b8>
But still no generated spec files.
Version 1.0.0 has been released. Give this a try now.
Can you publish the gem on rubygems.org please? :)
It was pushed yesterday.
Perfect, this release fixed the issue for me. Thanks!
Hi, I have an issue that's somewhat similar to #51. When I run
retrospec puppet
from within my puppet module directory there are no spec tests generated. Nonetheless my manifests dir contains a bunch of .pp files.when I run
retrospec puppet
I get the following output:Successfully ran hook: /root/.retrospec/repos/retrospec-puppet-templates/clone-hook
But nothing happens:
ruby: 2.1.8 puppet-retrospec: 0.12.1 retrospec: 0.4.0
Am I missing something?