1

I am trying to install .net framework 4.5.2 using puppet module using exec resource instead of using Package resource due to some reason. I want to write a test case to check if it is installed or not. The only way I could find to check if it is installed or not is checking registry key.

I would like to know if I could write a test in rspec-puppet to check if registry exists or not?

I tried posting this question on serverfault but I am not able to deal with Captcha, its asking it for infinite number of times so I had to post here. Apologies.

Thanks in Advance

Ankita13
  • 469
  • 2
  • 7
  • 21

1 Answers1

1

While I'm not sure about using rspec-puppet for testing if the registry key exists, you can use rspec-puppet to see if the catalogue contains the registry_key resource.

We usually write tests surrounding registry access in rspec - here is an example: https://github.com/puppetlabs/puppetlabs-dsc/blob/master/spec/unit/puppet_x/puppetlabs/dsc_symlink_spec.rb#L122-L152

ferventcoder
  • 11,952
  • 3
  • 57
  • 90