File tree Expand file tree Collapse file tree 4 files changed +4
-27
lines changed Expand file tree Collapse file tree 4 files changed +4
-27
lines changed Original file line number Diff line number Diff line change 13
13
'ensure_param=present variant_pattern_param=0xAE321EEF url_param="https://www.google.com"'
14
14
end
15
15
16
- before ( :all ) do # rubocop:disable RSpec/BeforeAfterAll
17
- if Gem ::Version . new ( Puppet ::PUPPETVERSION ) >= Gem ::Version . new ( '5.3.0' ) && Gem ::Version . new ( Puppet ::PUPPETVERSION ) < Gem ::Version . new ( '5.4.0' )
18
- # work around https://tickets.puppetlabs.com/browse/PUP-8632 and https://tickets.puppetlabs.com/browse/PUP-9047
19
- FileUtils . mkdir_p ( File . expand_path ( '~/.puppetlabs/opt/puppet/cache/devices/the_node/state' ) )
20
- end
21
- end
22
-
23
16
describe 'using `puppet resource`' do
24
17
it 'manages resources on the target system' do
25
18
stdout_str , status = Open3 . capture2e ( "puppet resource #{ common_args } device_provider foo ensure=present #{ default_type_values } " )
103
96
DEVICE_CREDS
104
97
end
105
98
106
- def is_device_apply_supported?
107
- Gem ::Version . new ( Puppet ::PUPPETVERSION ) >= Gem ::Version . new ( '5.3.6' ) && Gem ::Version . new ( Puppet ::PUPPETVERSION ) != Gem ::Version . new ( '5.4.0' )
108
- end
109
-
110
99
before do
111
- skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{ Puppet ::PUPPETVERSION } is installed)" unless is_device_apply_supported?
100
+ skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{ Puppet ::PUPPETVERSION } is installed)"
112
101
device_conf . write ( device_conf_content )
113
102
device_conf . close
114
103
Original file line number Diff line number Diff line change 27
27
DEVICE_CONF
28
28
end
29
29
30
- def is_device_apply_supported?
31
- Gem ::Version . new ( Puppet ::PUPPETVERSION ) >= Gem ::Version . new ( '5.3.6' ) && Gem ::Version . new ( Puppet ::PUPPETVERSION ) != Gem ::Version . new ( '5.4.0' )
32
- end
33
-
34
30
before do
35
- skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{ Puppet ::PUPPETVERSION } is installed)" unless is_device_apply_supported?
31
+ skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{ Puppet ::PUPPETVERSION } is installed)"
36
32
device_conf . write ( device_conf_content )
37
33
device_conf . close
38
34
end
Original file line number Diff line number Diff line change 23
23
end
24
24
let ( :device_credentials ) { Tempfile . new ( 'credentials.txt' ) }
25
25
26
- def is_device_apply_supported?
27
- Gem ::Version . new ( Puppet ::PUPPETVERSION ) >= Gem ::Version . new ( '5.3.6' ) && Gem ::Version . new ( Puppet ::PUPPETVERSION ) != Gem ::Version . new ( '5.4.0' )
28
- end
29
-
30
26
before do
31
- skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{ Puppet ::PUPPETVERSION } is installed)" unless is_device_apply_supported?
27
+ skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{ Puppet ::PUPPETVERSION } is installed)"
32
28
device_conf . write ( device_conf_content )
33
29
device_conf . close
34
30
Original file line number Diff line number Diff line change 23
23
end
24
24
let ( :device_credentials ) { Tempfile . new ( 'credentials.txt' ) }
25
25
26
- def is_device_apply_supported?
27
- Gem ::Version . new ( Puppet ::PUPPETVERSION ) >= Gem ::Version . new ( '5.3.6' ) && Gem ::Version . new ( Puppet ::PUPPETVERSION ) != Gem ::Version . new ( '5.4.0' )
28
- end
29
-
30
26
before do
31
- skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{ Puppet ::PUPPETVERSION } is installed)" unless is_device_apply_supported?
27
+ skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{ Puppet ::PUPPETVERSION } is installed)"
32
28
device_conf . write ( device_conf_content )
33
29
device_conf . close
34
30
You can’t perform that action at this time.
0 commit comments