Skip to content

Commit

Permalink
change Puppet[:user] and Puppet[:group] to those of the user running …
Browse files Browse the repository at this point in the history
…the test.
  • Loading branch information
mmarod committed May 13, 2015
1 parent 7110a83 commit 78fd336
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rspec-puppet-augeas/fixtures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def apply(resource, logs)
confdir = Dir.mktmpdir
oldconfdir = Puppet[:confdir]
Puppet[:confdir] = confdir
Puppet[:user] = Etc.getpwuid(Process.uid).name
Puppet[:group] = Etc.getgrgid(Etc.getpwnam(Puppet[:user]).gid).name

[:require, :before, :notify, :subscribe].each { |p| resource.delete p }
catalog = Puppet::Resource::Catalog.new
Expand Down

0 comments on commit 78fd336

Please sign in to comment.