Trying to run actual commands that require a specific OS (and verify the expected behavior) is reserved for acceptance tests, not spec tests. There are no HP-UX acceptance tests, but you can look at other acceptance tests and https://github.com/puppetlabs/puppet/blob/master/docs/index.md for guidance on how to write them.
Our testing philosophy is to verify that API commands (such as modifycmd and trusted) perform the operations you expect them to in spec tests; if they interact with the OS we just verify that the expected interaction would be initiated (such as expecting it to attempt to run a command), not that the command actually runs. If there is interesting OS interaction, then we also write acceptance tests that will be run on a specific OS. As there is no CI infrastructure currently dedicated to HP-UX, the acceptance tests would be mainly for your own benefit. On Mon, Jan 5, 2015 at 10:22 AM, Felix Frank < felix.fr...@alumni.tu-berlin.de> wrote: > Hi, > > I don't fully understand the issue at hand, but it seems to me that > specs like the one for the gem provider do something similar. > > > https://github.com/puppetlabs/puppet/blob/master/spec/unit/provider/package/gem_spec.rb#L27 > > HTH, > Felix > > On 01/05/2015 07:03 PM, James Perry wrote: > > I am trying to add some functionality to the HP-UX user provider module. > > In the past I was able to submit changes that allowed it to check for > > trusted computing and find the password crypt properly. Unfortunately, > > even through the password was updated, HP-UX was not resetting the > > password age back to 0 days. I have the commands required to do that > > and the rspec tests work fine on HP-UX boxes, it fails elsewhere as I am > > using specific commands to test and get data. > > > > I still cannot seem to wrap my head around what is passed in and how to > > use rspec to verify the function works on HP-UX without trying to run > > the command. > > > > I know the trusted method fails to Trusted, I have not fixed that yet as > > I am trying to figure out how to properly code it so that I can override > > it in rspec to make sure nothing else is broken. > > > > What I have added to the modify command works by checking if the HP-UX > > server is trusted or not by running the trusted method. > > > > I am completely confused on the right ways to make rspec work with the > > code. I know the code works on the HP-UX hosts without issue, so that > > part is functional, I just cannot test it with rspec on Linux. > > > > Any help / suggestions would be greatly appreciated! > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-dev/54AAD67F.3020803%40alumni.tu-berlin.de > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CABy1mM%2BUxZwdAfst1ZcZF2PsYcEqh-DN7-6BEg1yuyF1qgCTPA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.