kitchen-rackspace 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b6ad1b82218423e30dd436c57e0949af375be81
4
- data.tar.gz: b540dc54dd38bc55cf9bf722c40ab295ce4368fc
3
+ metadata.gz: c6469e67fffc7ea57b835b40acdee063915b1e4f
4
+ data.tar.gz: 0d68de2a3c6855dc93ab3d8901692c7f86e8e94e
5
5
  SHA512:
6
- metadata.gz: df2555752417f24ba89c00527650c8d06683829b5923c05d94471e9b71220415972ea758fc15032939629e7b42b1f54a6afbb817a1597951afe8d3a4829693b6
7
- data.tar.gz: c35ed4715edc6cdf181bf38496a7f66f78f9a3622a562d3ae1c4fdf55212a7cac785aa22a72e9d0051b480085714884ae68cfc03a95a4992e6454c3c0c0d49ee
6
+ metadata.gz: b0d461f568bb73502343717b8cf6c6fff0c94b6401b5e12040111a2a281fbbfab373992e3bfe79ed783aac82982e66232b70dc9ebf72af85c9758e9833cb7249
7
+ data.tar.gz: 136be154ad4f08c62986760a1fb35039ac64f1c7c6f0ccbbe22358a82b1fff4a92304c36a30fb614f9448264b121b8cee2e2df1ae3ee28df83009bc2c798fca5
data/CHANGELOG.md CHANGED
@@ -1,8 +1,17 @@
1
+ # 0.6.1 / 2014-06-03
2
+
3
+ ### Bug Fixes
4
+
5
+ * PR [#26][] - Fix issue with builds failing due to a timeout set at 0
6
+
1
7
  # 0.6.0 / 2014-05-13
2
8
 
9
+ ### New Features
10
+
3
11
  * PR [#25][] - Allow overridding of Fog's default timeout; via [@pezholio][]
4
12
 
5
13
  ### Improvements
14
+
6
15
  * PR [#24][] - Error out immediately when trying to install in Ruby 1.8
7
16
 
8
17
  # 0.5.0 / 2014-05-01
@@ -53,6 +62,7 @@ boot times, via [@coderanger][]
53
62
 
54
63
  * Initial release! Woo!
55
64
 
65
+ [#26]: https://github.com/test-kitchen/kitchen-rackspace/pull/26
56
66
  [#25]: https://github.com/test-kitchen/kitchen-rackspace/pull/25
57
67
  [#24]: https://github.com/test-kitchen/kitchen-rackspace/pull/24
58
68
  [#23]: https://github.com/test-kitchen/kitchen-rackspace/pull/23
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'rspec/core/rake_task'
7
7
 
8
8
  Cane::RakeTask.new
9
9
 
10
- Rubocop::RakeTask.new do |task|
10
+ RuboCop::RakeTask.new do |task|
11
11
  task.patterns = %w(**/*.rb)
12
12
  end
13
13
 
@@ -66,8 +66,8 @@ module Kitchen
66
66
  required_config :public_key_path
67
67
 
68
68
  def initialize(config)
69
- Fog.timeout = config[:wait_for].to_i
70
69
  super
70
+ Fog.timeout = config[:wait_for].to_i
71
71
  end
72
72
 
73
73
  def create(state)
@@ -21,6 +21,6 @@ module Kitchen
21
21
  #
22
22
  # @author Jonathan Hartman <j@p4nt5.com>
23
23
  module Driver
24
- RACKSPACE_VERSION = '0.6.0'
24
+ RACKSPACE_VERSION = '0.6.1'
25
25
  end
26
26
  end
@@ -51,6 +51,10 @@ describe Kitchen::Driver::Rackspace do
51
51
  end
52
52
 
53
53
  describe '#initialize'do
54
+ before(:each) do
55
+ allow(Fog).to receive(:timeout=)
56
+ end
57
+
54
58
  context 'default options' do
55
59
  it 'defaults to v2 cloud' do
56
60
  expect(driver[:version]).to eq('v2')
@@ -89,6 +93,7 @@ describe Kitchen::Driver::Rackspace do
89
93
 
90
94
  it 'defaults to wait_for timeout of 600 seconds' do
91
95
  expect(driver[:wait_for]).to eq(600)
96
+ expect(Fog).to have_received(:timeout=).with(600)
92
97
  end
93
98
  end
94
99
 
@@ -131,7 +136,8 @@ describe Kitchen::Driver::Rackspace do
131
136
  end
132
137
 
133
138
  it 'sets the new wait_for variable' do
134
- expect(Fog.timeout).to eq(1200)
139
+ expect(driver[:wait_for]).to eq(1200)
140
+ expect(Fog).to have_received(:timeout=).with(1200)
135
141
  end
136
142
  end
137
143
 
@@ -162,9 +168,9 @@ describe Kitchen::Driver::Rackspace do
162
168
  config[:wait_for] = '1200'
163
169
  d = Kitchen::Driver::Rackspace.new(config)
164
170
  d.instance = instance
165
- d.stub(:default_name).and_return('a_monkey!')
166
- d.stub(:create_server).and_return(server)
167
- d.stub(:wait_for_sshd).with('1.2.3.4').and_return(true)
171
+ allow(d).to receive(:default_name).and_return('a_monkey!')
172
+ allow(d).to receive(:create_server).and_return(server)
173
+ allow(d).to receive(:wait_for_sshd).with('1.2.3.4').and_return(true)
168
174
  d
169
175
  end
170
176
 
@@ -205,14 +211,14 @@ describe Kitchen::Driver::Rackspace do
205
211
  let(:driver) do
206
212
  d = Kitchen::Driver::Rackspace.new(config)
207
213
  d.instance = instance
208
- d.stub(:compute).and_return(compute)
214
+ allow(d).to receive(:compute).and_return(compute)
209
215
  d
210
216
  end
211
217
 
212
218
  context 'a live server that needs to be destroyed' do
213
219
  it 'destroys the server' do
214
- state.should_receive(:delete).with(:server_id)
215
- state.should_receive(:delete).with(:hostname)
220
+ expect(state).to receive(:delete).with(:server_id)
221
+ expect(state).to receive(:delete).with(:hostname)
216
222
  driver.destroy(state)
217
223
  end
218
224
  end
@@ -221,9 +227,9 @@ describe Kitchen::Driver::Rackspace do
221
227
  let(:state) { Hash.new }
222
228
 
223
229
  it 'does nothing' do
224
- driver.stub(:compute)
225
- driver.should_not_receive(:compute)
226
- state.should_not_receive(:delete)
230
+ allow(driver).to receive(:compute)
231
+ expect(driver).to_not receive(:compute)
232
+ expect(state).to_not receive(:delete)
227
233
  driver.destroy(state)
228
234
  end
229
235
  end
@@ -231,14 +237,14 @@ describe Kitchen::Driver::Rackspace do
231
237
  context 'a server that was already destroyed' do
232
238
  let(:servers) do
233
239
  s = double('servers')
234
- s.stub(:get).with('12345').and_return(nil)
240
+ allow(s).to receive(:get).with('12345').and_return(nil)
235
241
  s
236
242
  end
237
243
  let(:compute) { double(servers: servers) }
238
244
  let(:driver) do
239
245
  d = Kitchen::Driver::Rackspace.new(config)
240
246
  d.instance = instance
241
- d.stub(:compute).and_return(compute)
247
+ allow(d).to receive(:compute).and_return(compute)
242
248
  d
243
249
  end
244
250
 
@@ -260,7 +266,7 @@ describe Kitchen::Driver::Rackspace do
260
266
 
261
267
  context 'all requirements provided' do
262
268
  it 'creates a new compute connection' do
263
- Fog::Compute.stub(:new) { |arg| arg }
269
+ allow(Fog::Compute).to receive(:new) { |arg| arg }
264
270
  res = config.merge(provider: 'Rackspace', version: 'v2')
265
271
  expect(driver.send(:compute)).to eq(res)
266
272
  end
@@ -304,14 +310,14 @@ describe Kitchen::Driver::Rackspace do
304
310
  end
305
311
  let(:servers) do
306
312
  s = double('servers')
307
- s.stub(:bootstrap) { |arg| arg }
313
+ allow(s).to receive(:bootstrap) { |arg| arg }
308
314
  s
309
315
  end
310
316
  let(:compute) { double(servers: servers) }
311
317
  let(:driver) do
312
318
  d = Kitchen::Driver::Rackspace.new(config)
313
319
  d.instance = instance
314
- d.stub(:compute).and_return(compute)
320
+ allow(d).to receive(:compute).and_return(compute)
315
321
  d
316
322
  end
317
323
 
@@ -322,8 +328,8 @@ describe Kitchen::Driver::Rackspace do
322
328
 
323
329
  describe '#default_name' do
324
330
  before(:each) do
325
- Etc.stub(:getlogin).and_return('user')
326
- Socket.stub(:gethostname).and_return('host')
331
+ allow(Etc).to receive(:getlogin).and_return('user')
332
+ allow(Socket).to receive(:gethostname).and_return('host')
327
333
  end
328
334
 
329
335
  it 'generates a name' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-rackspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Hartman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-14 00:00:00.000000000 Z
11
+ date: 2014-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen