rspec-system 2.5.1 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,24 +10,56 @@ include RSpecSystem::Helpers
10
10
 
11
11
  RSpec.configure do |c|
12
12
  include RSpecSystem::Log
13
- include RSpecSystem::InternalHelpers
14
13
  c.include RSpecSystem::Helpers
15
- c.include RSpecSystem::InternalHelpers
16
14
  c.extend RSpecSystem::Helpers
17
15
 
18
- # This provides a path to save vagrant files
19
- c.add_setting :system_tmp
20
- # Storage for ssh channels
21
- c.add_setting :ssh_channels, :default => {}
22
- c.add_setting :rspec_storage, :default => {}
16
+ # Various global configuration items
17
+ c.add_setting :rs_tmp,
18
+ :default => Pathname.new(ENV['RS_TMP'] ||
19
+ File.expand_path(File.join(File.basename(__FILE__), '..', '.rspec_system')))
20
+ c.add_setting :rs_provider,
21
+ :default => ENV['RS_PROVIDER'] ||
22
+ ENV['RSPEC_VIRTUAL_ENV'] ||
23
+ 'vagrant_virtualbox'
24
+ c.add_setting :rs_set,
25
+ :default => ENV['RS_SET'] ||
26
+ ENV['RSPEC_SET']
27
+ c.add_setting :rs_destroy,
28
+ :default => (ENV['RS_DESTROY'] || ENV['RSPEC_DESTROY']) =~ /(no|false)/ ? false : true
29
+ c.add_setting :rs_custom_prefabs,
30
+ :default => Pathname.new(ENV['RS_CUSTOM_PREFABS'] ||
31
+ File.expand_path(File.join(File.basename(__FILE__), '..', '.prefabs.yml')))
32
+ c.add_setting :rs_config,
33
+ :default => YAML.load_file('.nodeset.yml')
34
+ c.add_setting :rs_ssh_tries,
35
+ :default => ENV['RS_SSH_TRIES'] || 10
36
+ c.add_setting :rs_ssh_sleep,
37
+ :default => ENV['RS_SSH_SLEEP'] || 4
38
+ c.add_setting :rs_ssh_timeout,
39
+ :default => ENV['RS_SSH_TIMEOUT'] || 60
23
40
 
24
- # Default the system_tmp dir to something random
25
- c.system_tmp = rspec_system_tmp
41
+ # Storage variable, for internal use only
42
+ # @private
43
+ c.add_setting :rs_storage, :default => {}
26
44
 
45
+ ns = RSpecSystem::NodeSet.create
27
46
  c.before :suite do
28
47
  # Before Suite exceptions get captured it seems
29
48
  begin
30
- start_nodes
49
+ output << "=begin===========================================================\n"
50
+ output << "\n"
51
+ output << bold("Starting nodes") << "\n"
52
+ output << "\n"
53
+ output << bold("Setname:") << " #{ns.setname}\n"
54
+ output << bold("Configuration:") << " #{ns.config.pretty_inspect}"
55
+ output << bold("Virtual Environment:") << " #{ns.provider_type}\n"
56
+ output << bold("Default node:") << " #{ns.default_node.name}\n"
57
+ output << bold("Destroy node:") << " #{ns.destroy}\n"
58
+ output << "\n"
59
+ ns.setup
60
+ output << "\n"
61
+ output << "=end=============================================================\n"
62
+ output << "\n"
31
63
  rescue => ex
32
64
  output << ex.inspect + " in\n"
33
65
  output << ex.backtrace.join("\n ") << "\n"
@@ -38,7 +70,14 @@ RSpec.configure do |c|
38
70
  c.after :suite do
39
71
  # After Suite exceptions get captured it seems
40
72
  begin
41
- stop_nodes
73
+ output << "\n"
74
+ output << "=begin===========================================================\n"
75
+ output << "\n"
76
+ output << bold("Stopping nodes\n")
77
+ output << "\n"
78
+ ns.teardown
79
+ output << "\n"
80
+ output << "=end=============================================================\n"
42
81
  rescue => ex
43
82
  output << ex.inspect + " in\n"
44
83
  output << ex.backtrace.join("\n ") << "\n"
@@ -1,27 +1,4 @@
1
1
  ---
2
- 'centos-58-x64':
3
- description: "Vagrant images obtained from http://puppet-vagrant-boxes.puppetlabs.com"
4
- facts:
5
- architecture: x86_64
6
- facterversion: "1.6.17"
7
- kernel: Linux
8
- kernelmajversion: "2.6"
9
- kernelrelease: "2.6.18-308.el5"
10
- kernelversion: "2.6.18"
11
- lsbdistcodename: Final
12
- lsbdistdescription: "CentOS release 5.8 (Final)"
13
- lsbdistid: CentOS
14
- lsbdistrelease: "5.8"
15
- lsbmajdistrelease: "5"
16
- lsbrelease: ":core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch"
17
- operatingsystem: CentOS
18
- operatingsystemrelease: "5.8"
19
- osfamily: RedHat
20
- rubyversion: "1.9.2"
21
- provider_specifics:
22
- vagrant:
23
- box: 'centos-58-x64'
24
- box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/centos-58-x64.box'
25
2
  'centos-59-x64':
26
3
  description: "Vagrant images obtained from http://puppet-vagrant-boxes.puppetlabs.com"
27
4
  facts:
@@ -42,33 +19,11 @@
42
19
  osfamily: RedHat
43
20
  rubyversion: "1.9.2"
44
21
  provider_specifics:
45
- vagrant:
22
+ vagrant_virtualbox:
46
23
  box: 'centos-59-x64-vbox4210-nocm'
47
24
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box'
48
25
  vsphere:
49
26
  template: 'centos-5-x86_64'
50
- 'centos-63-x64':
51
- description: "Vagrant images obtained from http://puppet-vagrant-boxes.puppetlabs.com"
52
- facts:
53
- architecture: x86_64
54
- facterversion: "1.6.17"
55
- kernel: Linux
56
- kernelversion: "2.6.32"
57
- kernelrelease: "2.6.32-279.el6.x86_64"
58
- lsbmajdistrelease: "6"
59
- lsbdistcodename: Final
60
- lsbdistdescription: "CentOS release 6.3 (Final)"
61
- lsbdistid: CentOS
62
- lsbdistrelease: "6.3"
63
- operatingsystem: CentOS
64
- operatingsystemrelease: "6.3"
65
- osfamily: RedHat
66
- kernelmajversion: "2.6"
67
- rubyversion: "1.8.7"
68
- provider_specifics:
69
- vagrant:
70
- box: 'centos-63-x64'
71
- box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/centos-63-x64.box'
72
27
  'centos-64-x64':
73
28
  description: ""
74
29
  facts:
@@ -88,9 +43,12 @@
88
43
  kernel: Linux
89
44
  rubyversion: "1.8.7"
90
45
  provider_specifics:
91
- vagrant:
46
+ vagrant_virtualbox:
92
47
  box: 'centos-64-x64-vbox4210-nocm'
93
48
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box'
49
+ vagrant_vmware_fusion:
50
+ box: 'centos-64-x64-vf503-nocm'
51
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box'
94
52
  vsphere:
95
53
  template: 'centos-6-x86_64'
96
54
  'fedora-18-x64':
@@ -110,30 +68,14 @@
110
68
  osfamily: RedHat
111
69
  rubyversion: 1.9.3
112
70
  provider_specifics:
113
- vagrant:
71
+ vagrant_virtualbox:
114
72
  box: 'fedora-18-x64-vbox4210-nocm'
115
73
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box'
74
+ vagrant_vmware_fusion:
75
+ box: 'fedora-18-x64-vf503-nocm'
76
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vf503-nocm.box'
116
77
  vsphere:
117
78
  template: 'fedora-18-x86_64'
118
- 'debian-606-x64':
119
- description: "Vagrant images obtained from http://puppet-vagrant-boxes.puppetlabs.com"
120
- facts:
121
- architecture: amd64
122
- facterversion: "1.6.17"
123
- kernel: Linux
124
- kernelmajversion: "2.6"
125
- kernelversion: "2.6.32"
126
- lsbdistcodename: squeeze
127
- lsbdistdescription: "Debian GNU/Linux 6.0.6 (squeeze)"
128
- lsbdistid: Debian
129
- lsbdistrelease: "6.0.6"
130
- operatingsystem: Debian
131
- osfamily: Debian
132
- rubyversion: "1.8.7"
133
- provider_specifics:
134
- vagrant:
135
- box: 'debian-606-x64'
136
- box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/debian-606-x64.box'
137
79
  'debian-607-x64':
138
80
  description: ""
139
81
  facts:
@@ -153,9 +95,12 @@
153
95
  lsbdistid: Debian
154
96
  architecture: amd64
155
97
  provider_specifics:
156
- vagrant:
98
+ vagrant_virtualbox:
157
99
  box: 'debian-607-x64-vbox4210-nocm'
158
100
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box'
101
+ vagrant_vmware_fusion:
102
+ box: 'debian-607-x64-vf503-nocm'
103
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vf503-nocm.box'
159
104
  vsphere:
160
105
  template: 'debian-6-x86_64'
161
106
  'debian-70rc1-x64':
@@ -177,33 +122,14 @@
177
122
  osfamily: Debian
178
123
  rubyversion: "1.9.3"
179
124
  provider_specifics:
180
- vagrant:
125
+ vagrant_virtualbox:
181
126
  box: 'debian-70rc1-x64-vbox4210-nocm'
182
127
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box'
128
+ vagrant_vmware_fusion:
129
+ box: 'debian-70rc1-x64-vf503-nocm'
130
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vf503-nocm.box'
183
131
  vsphere:
184
132
  template: 'debian-7-x86_64'
185
- 'ubuntu-server-1004-x64':
186
- description: ''
187
- facts:
188
- kernel: Linux
189
- operatingsystemrelease: "10.04"
190
- lsbmajdistrelease: "10"
191
- kernelrelease: "2.6.32-38-server"
192
- osfamily: Debian
193
- lsbdistrelease: "10.04"
194
- lsbdistdescription: "Ubuntu 10.04.4 LTS"
195
- kernelversion: "2.6.32"
196
- lsbdistcodename: lucid
197
- operatingsystem: Ubuntu
198
- facterversion: "1.6.17"
199
- kernelmajversion: "2.6"
200
- architecture: amd64
201
- rubyversion: "1.8.7"
202
- lsbdistid: Ubuntu
203
- provider_specifics:
204
- vagrant:
205
- box: 'ubuntu-server-1004-x64'
206
- box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-1004-x64.box'
207
133
  'ubuntu-server-10044-x64':
208
134
  description: ""
209
135
  facts:
@@ -223,33 +149,14 @@
223
149
  rubyversion: "1.8.7"
224
150
  lsbdistid: Ubuntu
225
151
  provider_specifics:
226
- vagrant:
152
+ vagrant_virtualbox:
227
153
  box: 'ubuntu-server-10044-x64-vbox4210-nocm'
228
154
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box'
155
+ vagrant_vmware_fusion:
156
+ box: 'ubuntu-server-10044-x64-vf503-nocm'
157
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-fusion503-nocm.box'
229
158
  vsphere:
230
159
  template: 'ubuntu-1004-x86_64'
231
- 'ubuntu-server-1204-x64':
232
- description: ''
233
- facts:
234
- kernel: Linux
235
- architecture: amd64
236
- operatingsystem: Ubuntu
237
- lsbdistid: Ubuntu
238
- facterversion: "1.6.17"
239
- kernelmajversion: "3.2"
240
- kernelrelease: "3.2.0-29-generic"
241
- kernelversion: "3.2.0"
242
- lsbdistcodename: precise
243
- lsbdistdescription: "Ubuntu 12.04.1 LTS"
244
- lsbdistrelease: "12.04"
245
- lsbmajdistrelease: "12"
246
- operatingsystemrelease: "12.04"
247
- osfamily: Debian
248
- rubyversion: "1.9.2"
249
- provider_specifics:
250
- vagrant:
251
- box: 'ubuntu-server-1204-x64'
252
- box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-1204-x64.box'
253
160
  'ubuntu-server-12042-x64':
254
161
  description: "Foo"
255
162
  facts:
@@ -269,9 +176,12 @@
269
176
  osfamily: Debian
270
177
  rubyversion: "1.9.3"
271
178
  provider_specifics:
272
- vagrant:
179
+ vagrant_virtualbox:
273
180
  box: 'ubuntu-server-12042-x64-vbox4210-nocm'
274
181
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box'
182
+ vagrant_vmware_fusion:
183
+ box: 'ubuntu-server-12042-x64-vf503-nocm'
184
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vf503-nocm.box'
275
185
  vsphere:
276
186
  template: 'ubuntu-1204-x86_64'
277
187
  'sles-11sp1-x64':
@@ -288,7 +198,7 @@
288
198
  rubyversion: "1.8.7"
289
199
  architecture: x86_64
290
200
  provider_specifics:
291
- vagrant:
201
+ vagrant_virtualbox:
292
202
  box: 'sles-11sp1-x64-vbox4210-nocm'
293
203
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box'
294
204
  vsphere:
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  # Metadata
4
4
  s.name = "rspec-system"
5
- s.version = "2.5.1"
5
+ s.version = "2.6.0"
6
6
  s.authors = ["Ken Barber"]
7
7
  s.email = ["info@puppetlabs.com"]
8
8
  s.homepage = "https://github.com/puppetlabs/rspec-system"
@@ -17,12 +17,12 @@ Gem::Specification.new do |s|
17
17
 
18
18
  # Dependencies
19
19
  s.required_ruby_version = '>= 1.8.7'
20
- s.add_runtime_dependency "rspec", '~>2.13'
20
+ s.add_runtime_dependency "rspec", '~>2.14'
21
21
  s.add_runtime_dependency "kwalify", '~>0.7.2'
22
22
  s.add_runtime_dependency "systemu", '~>2.5'
23
- s.add_runtime_dependency "net-ssh", '~>2.6'
23
+ s.add_runtime_dependency "net-ssh", '~>2.7'
24
24
  s.add_runtime_dependency "net-scp", '~>1.1'
25
25
  s.add_runtime_dependency "rbvmomi", '~>1.6'
26
26
  # It seems 1.6.0 relies on ruby 1.9.2, so lets pin it for now
27
- s.add_runtime_dependency "nokogiri", '~>1.5.9'
27
+ s.add_runtime_dependency "nokogiri", '~>1.5.10'
28
28
  end
@@ -21,7 +21,6 @@ RSpec.configure do |c|
21
21
  c.include ::LocalHelpers
22
22
 
23
23
  c.before :suite do
24
- shell 'echo "mesg n" >> ~/.profile'
25
24
  shell 'echo foobar > /tmp/setupblock'
26
25
  end
27
26
  end
@@ -1,9 +1,15 @@
1
1
  require 'spec_helper_system'
2
2
 
3
3
  describe "base:" do
4
- it 'hostname -f returns something valid' do
4
+ it 'hostname variants should return the proper hostname' do
5
5
  shell 'hostname -f' do |r|
6
- r.stdout.should =~ /^main/
6
+ r.stdout.should =~ /^main$/
7
+ r.exit_code.should == 0
8
+ r.stderr.should == ''
9
+ end
10
+
11
+ shell 'hostname' do |r|
12
+ r.stdout.should =~ /^main$/
7
13
  r.exit_code.should == 0
8
14
  r.stderr.should == ''
9
15
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-system
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
5
- prerelease:
4
+ version: 2.6.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ken Barber
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-20 00:00:00.000000000 Z
11
+ date: 2013-11-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '2.13'
19
+ version: '2.14'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: '2.13'
26
+ version: '2.14'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: kwalify
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: systemu
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,23 +55,20 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: net-ssh
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
69
- version: '2.6'
61
+ version: '2.7'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
77
- version: '2.6'
68
+ version: '2.7'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: net-scp
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rbvmomi
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,19 +97,17 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: nokogiri
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ~>
116
102
  - !ruby/object:Gem::Version
117
- version: 1.5.9
103
+ version: 1.5.10
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ~>
124
109
  - !ruby/object:Gem::Version
125
- version: 1.5.9
110
+ version: 1.5.10
126
111
  description:
127
112
  email:
128
113
  - info@puppetlabs.com
@@ -155,12 +140,13 @@ files:
155
140
  - lib/rspec-system/helpers.rb
156
141
  - lib/rspec-system/helpers/rcp.rb
157
142
  - lib/rspec-system/helpers/shell.rb
158
- - lib/rspec-system/internal_helpers.rb
159
143
  - lib/rspec-system/log.rb
160
144
  - lib/rspec-system/node.rb
161
145
  - lib/rspec-system/node_set.rb
162
146
  - lib/rspec-system/node_set/base.rb
163
- - lib/rspec-system/node_set/vagrant.rb
147
+ - lib/rspec-system/node_set/vagrant_base.rb
148
+ - lib/rspec-system/node_set/vagrant_virtualbox.rb
149
+ - lib/rspec-system/node_set/vagrant_vmware_fusion.rb
164
150
  - lib/rspec-system/node_set/vsphere.rb
165
151
  - lib/rspec-system/prefab.rb
166
152
  - lib/rspec-system/rake_task.rb
@@ -190,28 +176,27 @@ files:
190
176
  homepage: https://github.com/puppetlabs/rspec-system
191
177
  licenses:
192
178
  - Apache 2.0
179
+ metadata: {}
193
180
  post_install_message:
194
181
  rdoc_options: []
195
182
  require_paths:
196
183
  - lib
197
184
  - resources
198
185
  required_ruby_version: !ruby/object:Gem::Requirement
199
- none: false
200
186
  requirements:
201
- - - ! '>='
187
+ - - '>='
202
188
  - !ruby/object:Gem::Version
203
189
  version: 1.8.7
204
190
  required_rubygems_version: !ruby/object:Gem::Requirement
205
- none: false
206
191
  requirements:
207
- - - ! '>='
192
+ - - '>='
208
193
  - !ruby/object:Gem::Version
209
194
  version: '0'
210
195
  requirements: []
211
196
  rubyforge_project:
212
- rubygems_version: 1.8.25
197
+ rubygems_version: 2.1.10
213
198
  signing_key:
214
- specification_version: 3
199
+ specification_version: 4
215
200
  summary: System testing with rspec
216
201
  test_files:
217
202
  - spec/system/base_spec.rb