rspec-puppet-facts 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -0
- data/Vagrantfile +14 -12
- data/facts/1.6/archlinux-3-i386.facts +54 -0
- data/facts/1.6/sles-11-i386.facts +59 -0
- data/facts/1.6/sles-11-x86_64.facts +59 -0
- data/facts/1.6/ubuntu-10.04-i386.facts +62 -0
- data/facts/1.6/ubuntu-10.04-x86_64.facts +62 -0
- data/facts/1.7/archlinux-3-i386.facts +83 -0
- data/facts/1.7/sles-11-i386.facts +82 -0
- data/facts/1.7/sles-11-x86_64.facts +82 -0
- data/facts/1.7/ubuntu-10.04-i386.facts +87 -0
- data/facts/1.7/ubuntu-10.04-x86_64.facts +87 -0
- data/facts/2.0/archlinux-3-i386.facts +85 -0
- data/facts/2.0/sles-11-i386.facts +81 -0
- data/facts/2.0/sles-11-x86_64.facts +81 -0
- data/facts/2.0/ubuntu-10.04-i386.facts +86 -0
- data/facts/2.0/ubuntu-10.04-x86_64.facts +86 -0
- data/facts/2.1/archlinux-3-i386.facts +88 -0
- data/facts/2.1/sles-11-i386.facts +82 -0
- data/facts/2.1/sles-11-x86_64.facts +82 -0
- data/facts/2.1/ubuntu-10.04-i386.facts +87 -0
- data/facts/2.1/ubuntu-10.04-x86_64.facts +87 -0
- data/facts/2.2/archlinux-3-i386.facts +93 -0
- data/facts/2.2/sles-11-i386.facts +87 -0
- data/facts/2.2/sles-11-x86_64.facts +87 -0
- data/facts/2.2/ubuntu-10.04-i386.facts +92 -0
- data/facts/2.2/ubuntu-10.04-x86_64.facts +92 -0
- data/facts/2.3/archlinux-3-i386.facts +94 -0
- data/facts/2.3/sles-11-i386.facts +88 -0
- data/facts/2.3/sles-11-x86_64.facts +88 -0
- data/facts/2.3/ubuntu-10.04-i386.facts +93 -0
- data/facts/2.3/ubuntu-10.04-x86_64.facts +93 -0
- data/lib/rspec-puppet-facts.rb +1 -1
- data/lib/rspec-puppet-facts/version.rb +1 -1
- data/spec/rspec_puppet_facts_spec.rb +28 -0
- metadata +31 -1
@@ -0,0 +1,93 @@
|
|
1
|
+
architecture => amd64
|
2
|
+
bios_release_date => 12/01/2006
|
3
|
+
bios_vendor => innotek GmbH
|
4
|
+
bios_version => VirtualBox
|
5
|
+
blockdevice_sda_model => VBOX HARDDISK
|
6
|
+
blockdevice_sda_size => 10632560640
|
7
|
+
blockdevice_sda_vendor => ATA
|
8
|
+
blockdevice_sr0_model => CD-ROM
|
9
|
+
blockdevice_sr0_size => 1073741312
|
10
|
+
blockdevice_sr0_vendor => VBOX
|
11
|
+
blockdevice_sr1_model => CD-ROM
|
12
|
+
blockdevice_sr1_size => 1073741312
|
13
|
+
blockdevice_sr1_vendor => VBOX
|
14
|
+
blockdevices => sda,sr0,sr1
|
15
|
+
boardmanufacturer => Oracle Corporation
|
16
|
+
boardproductname => VirtualBox
|
17
|
+
boardserialnumber => 0
|
18
|
+
domain => vm
|
19
|
+
facterversion => 2.3.0
|
20
|
+
filesystems => ext2,ext3,ext4
|
21
|
+
fqdn => ubuntu-server-10044-x64-vbox4210-nocm.vm
|
22
|
+
gem_version => ~> 2.3.0
|
23
|
+
gid => root
|
24
|
+
hardwareisa => unknown
|
25
|
+
hardwaremodel => x86_64
|
26
|
+
hostname => ubuntu-server-10044-x64-vbox4210-nocm
|
27
|
+
id => root
|
28
|
+
interfaces => eth0,lo
|
29
|
+
ipaddress => 10.0.2.15
|
30
|
+
ipaddress_eth0 => 10.0.2.15
|
31
|
+
ipaddress_lo => 127.0.0.1
|
32
|
+
is_virtual => true
|
33
|
+
kernel => Linux
|
34
|
+
kernelmajversion => 2.6
|
35
|
+
kernelrelease => 2.6.32-46-server
|
36
|
+
kernelversion => 2.6.32
|
37
|
+
lsbdistcodename => lucid
|
38
|
+
lsbdistdescription => Ubuntu 10.04.4 LTS
|
39
|
+
lsbdistid => Ubuntu
|
40
|
+
lsbdistrelease => 10.04
|
41
|
+
lsbmajdistrelease => 10.04
|
42
|
+
macaddress => 08:00:27:35:10:7d
|
43
|
+
macaddress_eth0 => 08:00:27:35:10:7d
|
44
|
+
manufacturer => innotek GmbH
|
45
|
+
memoryfree => 290.91 MB
|
46
|
+
memoryfree_mb => 290.91
|
47
|
+
memorysize => 367.41 MB
|
48
|
+
memorysize_mb => 367.41
|
49
|
+
mtu_eth0 => 1500
|
50
|
+
mtu_lo => 16436
|
51
|
+
netmask => 255.255.255.0
|
52
|
+
netmask_eth0 => 255.255.255.0
|
53
|
+
netmask_lo => 255.0.0.0
|
54
|
+
network_eth0 => 10.0.2.0
|
55
|
+
network_lo => 127.0.0.0
|
56
|
+
operatingsystem => Ubuntu
|
57
|
+
operatingsystemmajrelease => 10.04
|
58
|
+
operatingsystemrelease => 10.04
|
59
|
+
os => {"family"=>"Debian", "release"=>{"full"=>"10.04", "major"=>"10.04"}, "lsb"=>{"majdistrelease"=>"10.04", "distdescription"=>"Ubuntu 10.04.4 LTS", "distid"=>"Ubuntu", "distcodename"=>"lucid", "distrelease"=>"10.04"}, "name"=>"Ubuntu"}
|
60
|
+
osfamily => Debian
|
61
|
+
partitions => {"sda1"=>{"filesystem"=>"ext2", "size"=>"497664", "mount"=>"/boot", "uuid"=>"72597d30-8c93-43e3-9f5f-929f9c67b4b9"}, "sda2"=>{"size"=>"2"}, "sda5"=>{"filesystem"=>"LVM2_member", "size"=>"20262912"}}
|
62
|
+
path => /home/vagrant/vendor/bundler/ruby/1.8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin/:/root/.gem/ruby/2.1.0/bin
|
63
|
+
physicalprocessorcount => 1
|
64
|
+
processor0 => Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz
|
65
|
+
processorcount => 1
|
66
|
+
processors => {"count"=>1, "physicalcount"=>1, "models"=>["Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz"]}
|
67
|
+
productname => VirtualBox
|
68
|
+
ps => ps -ef
|
69
|
+
rubyplatform => x86_64-linux
|
70
|
+
rubysitedir => /usr/local/lib/site_ruby/1.8
|
71
|
+
rubyversion => 1.8.7
|
72
|
+
selinux => false
|
73
|
+
serialnumber => 0
|
74
|
+
sshdsakey => AAAAB3NzaC1kc3MAAACBALgXGkqVE6srvj0+++yhW6jn5mFqiK65SPHOpVok5VKwb2Xh61QshNRa/E5JVkc3PrM81tQwHxseLWWgLO0jhWsrQk6fW5PFid4SBgRxumuC4Eb2wjCtQkBXtCDO/YmhN5dC1Y1s3hmVMci4gISqI8aMsiMz1VPldQJC9DTTwNGLAAAAFQCIintMfOw0Uk+Zovzyd6fzhcQn5wAAAIAGgIjtHoj6czvnC9pdSI18lr3PJj89GsEK/FGkAEcl8UaaI+pjElw60DVVOgBiDbigZFEzyntxTRvsjdLM7gGuLc7TEKNcrozrcScJ8CSSCYIc4cty3/4TBMjbDD8ra5bsbAl9Jts6fTnD/pPiQf95H4cfCpp19+XQ5fQzBAQcfgAAAIBMRqT6jZwsaIextRhm2Ezt2hrPPd4n8MpERHrItXsn5GiAbNXMf62Rhb76JQy/DzT0uSJDweUC4cazaRSUNDgxJjvX0xXuFv49Sf0yiibFYzmnJCvzISe+9AZe2eBWvm5sMKwzxz1cydyPUV8svvG79CapZlnWIPRrntKgDAOUtA==
|
75
|
+
sshfp_dsa => SSHFP 2 1 356ca8ba949767942789cd6141c20244bfcbef70
|
76
|
+
SSHFP 2 2 ea0724f96bbf52c15d806ca3759e3cbc346bc9db0363d0cac700261c4bbfc03c
|
77
|
+
sshfp_rsa => SSHFP 1 1 34e00d0846b32174b75c7f0b91443c4cc6e5604f
|
78
|
+
SSHFP 1 2 9293219b21656b6647a7fdf19bf61aebe591b3c153b16017e69c440f7b885443
|
79
|
+
sshrsakey => AAAAB3NzaC1yc2EAAAABIwAAAQEA0b1qlpz3m+Ul39u+sgzIdiQErIP7SOe6lr/FTKQyrGQMVaJq5uFx/OSQrLp4OPa62whDdqOW5HoLlHde4L2UclRHiz/PIMVi9b7h8MzysTlhZxu41GZLqwsmfHs0imILrSDOxDtbM0EhZfaQ/49r6QgMwiktTbOqUiQd1A4/Uu48Bfpkk1dRLKxZ/GyZxnVfGtIJrXsR1yfPkFYfkOiVwxG8ws85OjOPJPGI/Crug9Z9YDHEMWYmjMaMdTiybsb6DMITpMGXQjV1cDAQdaTDjhkdrj0OmeK25JRo40xe2M2c1X/uKhZLBTAtUmibLdTr0tXfGSwhREi5+r4tXpo8ZQ==
|
80
|
+
swapfree => 471.99 MB
|
81
|
+
swapfree_mb => 471.99
|
82
|
+
swapsize => 471.99 MB
|
83
|
+
swapsize_mb => 471.99
|
84
|
+
system_uptime => {"hours"=>0, "days"=>0, "seconds"=>1097, "uptime"=>"0:18 hours"}
|
85
|
+
timezone => CET
|
86
|
+
type => Other
|
87
|
+
uniqueid => 007f0101
|
88
|
+
uptime => 0:18 hours
|
89
|
+
uptime_days => 0
|
90
|
+
uptime_hours => 0
|
91
|
+
uptime_seconds => 1097
|
92
|
+
uuid => F5EFA642-9E14-4C01-875C-F71426F02AEF
|
93
|
+
virtual => virtualbox
|
data/lib/rspec-puppet-facts.rb
CHANGED
@@ -14,7 +14,7 @@ module RspecPuppetFacts
|
|
14
14
|
os_sup['operatingsystemrelease'].map do |operatingsystemmajrelease|
|
15
15
|
opts[:hardwaremodels].each do |hardwaremodel|
|
16
16
|
facts = {}
|
17
|
-
os = "#{operatingsystem}-#{operatingsystemmajrelease}-#{hardwaremodel}"
|
17
|
+
os = "#{operatingsystem}-#{operatingsystemmajrelease.split(" ")[0]}-#{hardwaremodel}"
|
18
18
|
# TODO: use SemVer here
|
19
19
|
facter_minor_version = Facter.version[0..2]
|
20
20
|
file = File.expand_path(File.join(File.dirname(__FILE__), "../facts/#{facter_minor_version}/#{os}.facts"))
|
@@ -76,6 +76,34 @@ describe 'RspecPuppetFacts' do
|
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
|
+
context 'When operatingsystemrelease has space' do
|
80
|
+
subject {
|
81
|
+
on_supported_os(
|
82
|
+
{
|
83
|
+
:supported_os => [
|
84
|
+
{
|
85
|
+
"operatingsystem" => "SLES",
|
86
|
+
"operatingsystemrelease" => [
|
87
|
+
"11 SP1"
|
88
|
+
]
|
89
|
+
}
|
90
|
+
]
|
91
|
+
}
|
92
|
+
)
|
93
|
+
}
|
94
|
+
it 'should return a hash' do
|
95
|
+
expect(subject.class).to eq Hash
|
96
|
+
end
|
97
|
+
it 'should have 1 elements' do
|
98
|
+
expect(subject.size).to eq 1
|
99
|
+
end
|
100
|
+
it 'should return supported OS' do
|
101
|
+
expect(subject.keys.sort).to eq [
|
102
|
+
'sles-11-x86_64',
|
103
|
+
]
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
79
107
|
context 'When specifying wrong supported_os' do
|
80
108
|
subject {
|
81
109
|
on_supported_os(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-puppet-facts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mickaël Canévet
|
@@ -26,6 +26,7 @@ files:
|
|
26
26
|
- README.md
|
27
27
|
- Rakefile
|
28
28
|
- Vagrantfile
|
29
|
+
- facts/1.6/archlinux-3-i386.facts
|
29
30
|
- facts/1.6/archlinux-3-x86_64.facts
|
30
31
|
- facts/1.6/centos-5-i386.facts
|
31
32
|
- facts/1.6/centos-5-x86_64.facts
|
@@ -57,10 +58,15 @@ files:
|
|
57
58
|
- facts/1.6/scientific-6-x86_64.facts
|
58
59
|
- facts/1.6/scientific-7-i386.facts
|
59
60
|
- facts/1.6/scientific-7-x86_64.facts
|
61
|
+
- facts/1.6/sles-11-i386.facts
|
62
|
+
- facts/1.6/sles-11-x86_64.facts
|
63
|
+
- facts/1.6/ubuntu-10.04-i386.facts
|
64
|
+
- facts/1.6/ubuntu-10.04-x86_64.facts
|
60
65
|
- facts/1.6/ubuntu-12.04-i386.facts
|
61
66
|
- facts/1.6/ubuntu-12.04-x86_64.facts
|
62
67
|
- facts/1.6/ubuntu-14.04-i386.facts
|
63
68
|
- facts/1.6/ubuntu-14.04-x86_64.facts
|
69
|
+
- facts/1.7/archlinux-3-i386.facts
|
64
70
|
- facts/1.7/archlinux-3-x86_64.facts
|
65
71
|
- facts/1.7/centos-5-i386.facts
|
66
72
|
- facts/1.7/centos-5-x86_64.facts
|
@@ -92,10 +98,15 @@ files:
|
|
92
98
|
- facts/1.7/scientific-6-x86_64.facts
|
93
99
|
- facts/1.7/scientific-7-i386.facts
|
94
100
|
- facts/1.7/scientific-7-x86_64.facts
|
101
|
+
- facts/1.7/sles-11-i386.facts
|
102
|
+
- facts/1.7/sles-11-x86_64.facts
|
103
|
+
- facts/1.7/ubuntu-10.04-i386.facts
|
104
|
+
- facts/1.7/ubuntu-10.04-x86_64.facts
|
95
105
|
- facts/1.7/ubuntu-12.04-i386.facts
|
96
106
|
- facts/1.7/ubuntu-12.04-x86_64.facts
|
97
107
|
- facts/1.7/ubuntu-14.04-i386.facts
|
98
108
|
- facts/1.7/ubuntu-14.04-x86_64.facts
|
109
|
+
- facts/2.0/archlinux-3-i386.facts
|
99
110
|
- facts/2.0/archlinux-3-x86_64.facts
|
100
111
|
- facts/2.0/centos-5-i386.facts
|
101
112
|
- facts/2.0/centos-5-x86_64.facts
|
@@ -129,10 +140,15 @@ files:
|
|
129
140
|
- facts/2.0/scientific-6-x86_64.facts
|
130
141
|
- facts/2.0/scientific-7-i386.facts
|
131
142
|
- facts/2.0/scientific-7-x86_64.facts
|
143
|
+
- facts/2.0/sles-11-i386.facts
|
144
|
+
- facts/2.0/sles-11-x86_64.facts
|
145
|
+
- facts/2.0/ubuntu-10.04-i386.facts
|
146
|
+
- facts/2.0/ubuntu-10.04-x86_64.facts
|
132
147
|
- facts/2.0/ubuntu-12.04-i386.facts
|
133
148
|
- facts/2.0/ubuntu-12.04-x86_64.facts
|
134
149
|
- facts/2.0/ubuntu-14.04-i386.facts
|
135
150
|
- facts/2.0/ubuntu-14.04-x86_64.facts
|
151
|
+
- facts/2.1/archlinux-3-i386.facts
|
136
152
|
- facts/2.1/archlinux-3-x86_64.facts
|
137
153
|
- facts/2.1/centos-5-i386.facts
|
138
154
|
- facts/2.1/centos-5-x86_64.facts
|
@@ -166,10 +182,15 @@ files:
|
|
166
182
|
- facts/2.1/scientific-6-x86_64.facts
|
167
183
|
- facts/2.1/scientific-7-i386.facts
|
168
184
|
- facts/2.1/scientific-7-x86_64.facts
|
185
|
+
- facts/2.1/sles-11-i386.facts
|
186
|
+
- facts/2.1/sles-11-x86_64.facts
|
187
|
+
- facts/2.1/ubuntu-10.04-i386.facts
|
188
|
+
- facts/2.1/ubuntu-10.04-x86_64.facts
|
169
189
|
- facts/2.1/ubuntu-12.04-i386.facts
|
170
190
|
- facts/2.1/ubuntu-12.04-x86_64.facts
|
171
191
|
- facts/2.1/ubuntu-14.04-i386.facts
|
172
192
|
- facts/2.1/ubuntu-14.04-x86_64.facts
|
193
|
+
- facts/2.2/archlinux-3-i386.facts
|
173
194
|
- facts/2.2/archlinux-3-x86_64.facts
|
174
195
|
- facts/2.2/centos-5-i386.facts
|
175
196
|
- facts/2.2/centos-5-x86_64.facts
|
@@ -203,10 +224,15 @@ files:
|
|
203
224
|
- facts/2.2/scientific-6-x86_64.facts
|
204
225
|
- facts/2.2/scientific-7-i386.facts
|
205
226
|
- facts/2.2/scientific-7-x86_64.facts
|
227
|
+
- facts/2.2/sles-11-i386.facts
|
228
|
+
- facts/2.2/sles-11-x86_64.facts
|
229
|
+
- facts/2.2/ubuntu-10.04-i386.facts
|
230
|
+
- facts/2.2/ubuntu-10.04-x86_64.facts
|
206
231
|
- facts/2.2/ubuntu-12.04-i386.facts
|
207
232
|
- facts/2.2/ubuntu-12.04-x86_64.facts
|
208
233
|
- facts/2.2/ubuntu-14.04-i386.facts
|
209
234
|
- facts/2.2/ubuntu-14.04-x86_64.facts
|
235
|
+
- facts/2.3/archlinux-3-i386.facts
|
210
236
|
- facts/2.3/archlinux-3-x86_64.facts
|
211
237
|
- facts/2.3/centos-5-i386.facts
|
212
238
|
- facts/2.3/centos-5-x86_64.facts
|
@@ -240,6 +266,10 @@ files:
|
|
240
266
|
- facts/2.3/scientific-6-x86_64.facts
|
241
267
|
- facts/2.3/scientific-7-i386.facts
|
242
268
|
- facts/2.3/scientific-7-x86_64.facts
|
269
|
+
- facts/2.3/sles-11-i386.facts
|
270
|
+
- facts/2.3/sles-11-x86_64.facts
|
271
|
+
- facts/2.3/ubuntu-10.04-i386.facts
|
272
|
+
- facts/2.3/ubuntu-10.04-x86_64.facts
|
243
273
|
- facts/2.3/ubuntu-12.04-i386.facts
|
244
274
|
- facts/2.3/ubuntu-12.04-x86_64.facts
|
245
275
|
- facts/2.3/ubuntu-14.04-i386.facts
|