vm_shepherd 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b205f1eac35569f69fe5709c0019c0fd51a6e86
4
- data.tar.gz: 105cc945195c4300389ef2d5e208203ff5d35d6d
3
+ metadata.gz: 65cd3b777476ef982c70b4c99fc270ce34f0084a
4
+ data.tar.gz: b5f22dfd3e3111c58816f5e9260b53e1cfbd868a
5
5
  SHA512:
6
- metadata.gz: b872bef61ea5d9f432b822aebd8cfb8de74f97312d104ffc68c452b15ce4ee6c691c336899dddf52835f5b59715f2c5f49caaa951c361e8ce6a551e5295e0bf3
7
- data.tar.gz: fda97963ff3c34a9546c870d6e00b87897213f12ca4a4295fc19d46c4d8c0eea765a58260dd9b8d566764686122a48452a449a69d8797ddd71897ba053c21e3b
6
+ metadata.gz: 3c48b1d7f31e478ede8d86e5834689d22db887e879b6031fdcebf72c33067d6b80676f6313fbac27ab600e90c445d1d35ac5eb1009d5b3ea295d40df77f5b1ba
7
+ data.tar.gz: cc6ebc49f345869086b765fcd2971abf7b768737ae7d8404ae2a226dea441afc2b0bcac1ccbea5f958c85723bf67b250b76599eecc82ba6b4fd0bd0d72934499
@@ -162,7 +162,7 @@ module VmShepherd
162
162
  logger.info("trying to delete volume: #{volume.id}")
163
163
  volume.delete
164
164
  rescue AWS::EC2::Errors::VolumeInUse
165
- sleep 5
165
+ sleep VmShepherd::RetryHelper::RETRY_INTERVAL
166
166
  retry
167
167
  end
168
168
  end
@@ -4,7 +4,7 @@ module VmShepherd
4
4
  end
5
5
 
6
6
  RETRY_LIMIT = 60
7
- RETRY_INTERVAL = 5
7
+ RETRY_INTERVAL = 10
8
8
 
9
9
  def retry_until(retry_limit: RETRY_LIMIT, &block)
10
10
  tries = 0
@@ -1,3 +1,3 @@
1
1
  module VmShepherd
2
- VERSION = '1.6.0'.freeze
2
+ VERSION = '1.6.1'.freeze
3
3
  end
@@ -47,9 +47,10 @@ module VmShepherd
47
47
  end
48
48
 
49
49
  it 'expands the vapp_template into a TMP dir' do
50
- expect(vcloud_manager).to receive(:system).with("cd #{tmpdir} && tar xfv '#{expanded_vapp_template_path}'")
50
+ command = "cd #{tmpdir} && tar xfv '#{expanded_vapp_template_path}'"
51
+ expect(vcloud_manager).to receive(:system).with(command)
51
52
 
52
- expect { vcloud_manager.deploy(vapp_template_path, vapp_config) }.to raise_error
53
+ expect { vcloud_manager.deploy(vapp_template_path, vapp_config) }.to raise_error(RuntimeError, /#{command}/)
53
54
  end
54
55
 
55
56
  context 'when the template can be expanded' do
@@ -236,10 +237,14 @@ module VmShepherd
236
237
  end
237
238
 
238
239
  context 'when the vApp can NOT be deployed' do
240
+ let(:fake_deploy_error) { 'FAKE-VAPP-DEPLOY-ERROR' }
241
+
242
+ before { allow(VCloudSdk::Client).to receive(:new).and_raise('FAKE-VAPP-DEPLOY-ERROR') }
243
+
239
244
  it 'removes the expanded vApp template' do
240
245
  expect(FileUtils).to receive(:remove_entry_secure).with(tmpdir, force: true)
241
246
 
242
- expect { vcloud_manager.deploy(vapp_template_path, vapp_config) }.to raise_error
247
+ expect { vcloud_manager.deploy(vapp_template_path, vapp_config) }.to raise_error(/#{fake_deploy_error}/)
243
248
  end
244
249
  end
245
250
  end
@@ -257,7 +262,7 @@ module VmShepherd
257
262
  it 'removes the expanded vApp template' do
258
263
  expect(FileUtils).to receive(:remove_entry_secure).with(tmpdir, force: true)
259
264
 
260
- expect { vcloud_manager.deploy(vapp_template_path, vapp_config) }.to raise_error
265
+ expect { vcloud_manager.deploy(vapp_template_path, vapp_config) }.to raise_error(RuntimeError, /#{tar_expand_cmd}/)
261
266
  end
262
267
  end
263
268
  end
@@ -274,7 +279,7 @@ module VmShepherd
274
279
  it 'removes the expanded vApp template' do
275
280
  expect(FileUtils).to receive(:remove_entry_secure).with(tmpdir, force: true)
276
281
 
277
- expect { vcloud_manager.deploy(vapp_template_path, vapp_config) }.to raise_error
282
+ expect { vcloud_manager.deploy(vapp_template_path, vapp_config) }.to raise_error(RuntimeError, /VM exists at FAKE_IP/)
278
283
  end
279
284
  end
280
285
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vm_shepherd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ops Manager Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-15 00:00:00.000000000 Z
11
+ date: 2015-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  version: '0'
196
196
  requirements: []
197
197
  rubyforge_project:
198
- rubygems_version: 2.4.5
198
+ rubygems_version: 2.4.7
199
199
  signing_key:
200
200
  specification_version: 4
201
201
  summary: A tool for booting and tearing down Ops Manager VMs on various Infrastructures.