| Puppet Version: 6.4.2 Puppet Server Version: N/A OS Name/Version: AIX (any) When compiling a catalog for AIX, the user type causes the provider to actually execute commands using Puppet::Util::Execution.execute(). This is fine because they don't do anything and the catalog compiles fine anyway. However when we run tests on Windows with rspec-puppet, because it's pretending to be UNIX, the null_file is set to /dev/null https://github.com/puppetlabs/puppet/blob/3f7a06c50a8707811387dd60a6f7f26d94b606f4/lib/puppet/util/execution.rb#L191 and therefore ruby actually tries to read it, causing the catalog to fail with the following error:
No such file or directory @ rb_sysopen - /dev/null
|
This essentially means that it's impossible to test code destined for AIX on Windows if it includes a user resource that is managing groups (It's group management that causes this) This can be proven by putting a 'pry' into the above file and running any test that involves the following puppet code:
user { 'foo': |
ensure => present, |
groups => ['test'], |
}
|
You will see that it actually calls out and executes some commands, which it definitely shouldn't be doing as part of catalog compilation. |