File tree Expand file tree Collapse file tree 8 files changed +28
-18
lines changed Expand file tree Collapse file tree 8 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this
232
232
with:
233
233
234
234
``` sh
235
- BEAKER_setfile=debian11-64 bundle exec rake beaker
235
+ BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
236
236
```
237
237
238
- You can replace the string ` debian10 ` with any common operating system.
238
+ You can replace the string ` debian11 ` with any common operating system.
239
239
The following strings are known to work:
240
240
241
- * ubuntu1804
242
241
* ubuntu2004
243
- * debian10
242
+ * ubuntu2204
244
243
* debian11
245
244
* centos7
246
245
* centos8
246
+ * centos9
247
+ * almalinux8
248
+ * almalinux9
249
+ * fedora36
247
250
248
251
For more information and tips & tricks, see [ voxpupuli-acceptance's documentation] ( https://github.com/voxpupuli/voxpupuli-acceptance#running-tests ) .
249
252
Original file line number Diff line number Diff line change 2
2
# Managed by modulesync - DO NOT EDIT
3
3
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4
4
5
- modulesync_config_version : ' 6 .0.0'
5
+ modulesync_config_version : ' 7 .0.0'
Original file line number Diff line number Diff line change 4
4
source ENV [ 'GEM_SOURCE' ] || 'https://rubygems.org'
5
5
6
6
group :test do
7
- gem 'voxpupuli-test' , '~> 6 .0' , :require => false
7
+ gem 'voxpupuli-test' , '~> 7 .0' , :require => false
8
8
gem 'coveralls' , :require => false
9
9
gem 'simplecov-console' , :require => false
10
10
gem 'puppet_metadata' , '~> 3.0' , :require => false
Original file line number Diff line number Diff line change 17
17
add_custom_fact name . to_sym , value
18
18
end
19
19
end
20
+ Dir [ './spec/support/spec/**/*.rb' ] . sort . each { |f | require f }
Original file line number Diff line number Diff line change 5
5
6
6
require 'voxpupuli/acceptance/spec_helper_acceptance'
7
7
8
- configure_beaker
8
+ configure_beaker ( modules : :metadata )
9
9
10
10
Dir [ './spec/support/acceptance/**/*.rb' ] . sort . each { |f | require f }
Original file line number Diff line number Diff line change 7
7
Facter . clear
8
8
end
9
9
10
+ # rubocop:disable RSpec/IndexedLet
10
11
let ( :pip_version_output ) do
11
12
<<~EOS
12
13
pip 6.0.6 from /opt/boxen/homebrew/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg (python 2.7)
24
25
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
25
26
EOS
26
27
end
28
+ # rubocop:enable RSpec/IndexedLet
27
29
28
30
describe 'pip_version' do
29
31
context 'returns pip version when pip present' do
37
39
context 'returns nil when pip not present' do
38
40
it do
39
41
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'pip' ) . and_return ( false )
40
- expect ( Facter . value ( :pip_version ) ) . to eq ( nil )
42
+ expect ( Facter . value ( :pip_version ) ) . to be_nil
41
43
end
42
44
end
43
45
end
54
56
context 'returns nil when pip2 not present' do
55
57
it do
56
58
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'pip2' ) . and_return ( false )
57
- expect ( Facter . value ( :pip2_version ) ) . to eq ( nil )
59
+ expect ( Facter . value ( :pip2_version ) ) . to be_nil
58
60
end
59
61
end
60
62
end
71
73
context 'returns nil when pip3 not present' do
72
74
it do
73
75
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'pip3' ) . and_return ( false )
74
- expect ( Facter . value ( :pip3_version ) ) . to eq ( nil )
76
+ expect ( Facter . value ( :pip3_version ) ) . to be_nil
75
77
end
76
78
end
77
79
end
Original file line number Diff line number Diff line change 7
7
Facter . clear
8
8
end
9
9
10
+ # rubocop:disable RSpec/IndexedLet
10
11
let ( :python2_version_output ) do
11
12
<<~EOS
12
13
Python 2.7.9
17
18
Python 3.3.0
18
19
EOS
19
20
end
21
+ # rubocop:enable RSpec/IndexedLet
20
22
21
23
describe 'python_release' do
22
24
context 'returns Python release when `python` present' do
31
33
it do
32
34
allow ( Facter ::Util ::Resolution ) . to receive ( :exec ) . and_return ( false )
33
35
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python' ) . and_return ( false )
34
- expect ( Facter . value ( :python_release ) ) . to eq ( nil )
36
+ expect ( Facter . value ( :python_release ) ) . to be_nil
35
37
end
36
38
end
37
39
end
60
62
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python' ) . and_return ( true )
61
63
allow ( Facter ::Util ::Resolution ) . to receive ( :exec ) . with ( 'python -V 2>&1' ) . and_return ( python3_version_output )
62
64
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python2' ) . and_return ( false )
63
- expect ( Facter . value ( :python2_release ) ) . to eq ( nil )
65
+ expect ( Facter . value ( :python2_release ) ) . to be_nil
64
66
end
65
67
end
66
68
67
69
context 'returns nil when `python2` and `python` are absent' do
68
70
it do
69
71
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python' ) . and_return ( false )
70
72
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python2' ) . and_return ( false )
71
- expect ( Facter . value ( :python2_release ) ) . to eq ( nil )
73
+ expect ( Facter . value ( :python2_release ) ) . to be_nil
72
74
end
73
75
end
74
76
end
85
87
context 'returns nil when `python3` not present' do
86
88
it do
87
89
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python3' ) . and_return ( false )
88
- expect ( Facter . value ( :python3_release ) ) . to eq ( nil )
90
+ expect ( Facter . value ( :python3_release ) ) . to be_nil
89
91
end
90
92
end
91
93
end
Original file line number Diff line number Diff line change 7
7
Facter . clear
8
8
end
9
9
10
+ # rubocop:disable RSpec/IndexedLet
10
11
let ( :python2_version_output ) do
11
12
<<~EOS
12
13
Python 2.7.9
17
18
Python 3.3.0
18
19
EOS
19
20
end
21
+ # rubocop:enable RSpec/IndexedLet
20
22
21
23
describe 'python_version' do
22
24
context 'returns Python version when `python` present' do
30
32
context 'returns nil when `python` not present' do
31
33
it do
32
34
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python' ) . and_return ( false )
33
- expect ( Facter . value ( :python_version ) ) . to eq ( nil )
35
+ expect ( Facter . value ( :python_version ) ) . to be_nil
34
36
end
35
37
end
36
38
end
59
61
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python' ) . and_return ( true )
60
62
allow ( Facter ::Util ::Resolution ) . to receive ( :exec ) . with ( 'python -V 2>&1' ) . and_return ( python3_version_output )
61
63
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python2' ) . and_return ( false )
62
- expect ( Facter . value ( :python2_version ) ) . to eq ( nil )
64
+ expect ( Facter . value ( :python2_version ) ) . to be_nil
63
65
end
64
66
end
65
67
66
68
context 'returns nil when `python2` and `python` are absent' do
67
69
it do
68
70
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python2' ) . and_return ( false )
69
71
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python' ) . and_return ( false )
70
- expect ( Facter . value ( :python2_version ) ) . to eq ( nil )
72
+ expect ( Facter . value ( :python2_version ) ) . to be_nil
71
73
end
72
74
end
73
75
end
84
86
context 'returns nil when `python3` not present' do
85
87
it do
86
88
allow ( Facter ::Util ::Resolution ) . to receive ( :which ) . with ( 'python3' ) . and_return ( false )
87
- expect ( Facter . value ( :python3_version ) ) . to eq ( nil )
89
+ expect ( Facter . value ( :python3_version ) ) . to be_nil
88
90
end
89
91
end
90
92
end
You can’t perform that action at this time.
0 commit comments