Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

equal sign not working in serverspec for if condition

$
0
0
Hi, I have written below serverspec if os[:release] == '6' describe file('/etc/test.conf') do it { should exist } it { should be_owned_by 'root' } it { should be_grouped_into 'root' } it { should be_mode 0644 } end when I run getting No examples found. Finished in 0.00032 seconds (files took 11.07 seconds to load) 0 examples, 0 failures why my test doesn't pass in spite of my 'osrelease' is 6. But if I change the option to`if os[:release] < '7'` its working.

Viewing all articles
Browse latest Browse all 6104

Trending Articles