File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 2
2
require 'spec_helper'
3
3
require 'puppet/util'
4
4
require 'puppet_x/puppetlabs/powershell/powershell_manager'
5
+ require 'fileutils'
5
6
6
7
describe Puppet ::Type . type ( :exec ) . provider ( :powershell ) do
7
8
115
116
}
116
117
MANIFEST
117
118
}
119
+ let ( :tmpdir ) { Dir . mktmpdir ( 'statetmp' ) . encode! ( Encoding ::UTF_8 ) }
120
+
121
+ before :each do
122
+ # a statedir setting must now exist per the new transactionstore code
123
+ # introduced in Puppet 4.6 for corrective changes, as a new YAML file
124
+ # called transactionstore.yaml will be written under this path
125
+ # which defaults to c:\dev\null when not set on Windows
126
+ Puppet [ :statedir ] = tmpdir
127
+ end
128
+
129
+ after :each do
130
+ FileUtils . rm_rf ( tmpdir )
131
+ end
118
132
119
133
def compile_to_catalog ( string , node = Puppet ::Node . new ( 'foonode' ) )
120
134
Puppet [ :code ] = string
You can’t perform that action at this time.
0 commit comments