Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#10846) add spec tests for ntp class #6

Merged
merged 1 commit into from
Nov 17, 2011

Conversation

bodepd
Copy link
Contributor

@bodepd bodepd commented Nov 15, 2011

This commit adds some unit tests for the
ntp class.

@kbarber
Copy link
Contributor

kbarber commented Nov 15, 2011

Is it just me - or are you writing squashed code these days? :-). Where are the carriage returns that separate the parts? I'm just having trouble reading it mate :-).

end
end
(redhatish + debianish).each do |os|
describe "for opreating system #{os}" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

@kbarber
Copy link
Contributor

kbarber commented Nov 15, 2011

Can you add a rake file? :-) ... the one from puppetlabs-firewall is quite good and it gives me 'specs' (which is great for running rvm specs).

Besides the squashiness and the typo this is pretty good. Or at least as they say - 'better then having no tests' ;-).

@bodepd
Copy link
Contributor Author

bodepd commented Nov 16, 2011

I updated the commit in response to your comments

@kbarber
Copy link
Contributor

kbarber commented Nov 16, 2011

I haven't looked deeply into this I must admit, but I tried running:

rake spec

And:

rspec spec/unit/classes/ntp_spec.rb

And got:

1) ntp test platform specific resources for operating system debian 
 Failure/Error: it { should contain_service('ntp').with_name('ntp') }
 Puppet::Error:
   Could not find class ntp for kb.local at line 3 on node kb.local
 # ./spec/../../puppet/lib/puppet/indirector/catalog/compiler.rb:77:in `compile'
 # ./spec/../../puppet/lib/puppet/indirector/catalog/compiler.rb:75:in `compile'
 # ./spec/../../puppet/lib/puppet/indirector/catalog/compiler.rb:35:in `find'
 # ./spec/classes/ntp_spec.rb:23

Is this just a modulepath thing? Sorry I'm quite brain-dead today :-). I guess either way 'rake spec' should just work - at least that would be the expectation.

This commit adds some unit tests for the
ntp class.

Also adds a rakefile for running the spec tests
@bodepd
Copy link
Contributor Author

bodepd commented Nov 16, 2011

Did you create the symlink from puppetlabs-ntp -> ntp ? It looks like a modulepath thing

kbarber added a commit that referenced this pull request Nov 17, 2011
(#10846) add spec tests for ntp class
@kbarber kbarber merged commit 05c580b into puppetlabs:master Nov 17, 2011
@kbarber
Copy link
Contributor

kbarber commented Nov 17, 2011

Yeah - symlink was it - thanks. Hmm. Maybe we should import these things or something to avoid the need :-). shrug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants