beaker 4.8.0 → 4.9.0
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 +4 -4
- data/CHANGELOG.md +9 -1
- data/lib/beaker/ssh_connection.rb +3 -22
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/ssh_connection_spec.rb +1 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaccea8cc8165229c874ea04ca98c7a9cf8f2f6b
|
4
|
+
data.tar.gz: 399f13de4b1d8f2e420aa0c77325d9feecbe2ba6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0b10ca3c14140283f5b6379e679db95f67cf8bb00579c491628908c8274486e6dea92f626602ab5ef8bf678208a52b74c62fe8a65affaad4e7ab3d231d5905b
|
7
|
+
data.tar.gz: 7e60c41932f7947b7d8ab96263faab067a7780670a6401bada39b7365aec2ef8d2f19e67587dd54464e910d2dc5cebdc193bd82c80f9f828d7c8c4d0f0533aff
|
data/CHANGELOG.md
CHANGED
@@ -11,7 +11,13 @@ Tracking in this Changelog began for this project in version 3.25.0.
|
|
11
11
|
If you're looking for changes from before this, refer to the project's
|
12
12
|
git logs & PR history.
|
13
13
|
|
14
|
-
# [Unreleased](https://github.com/puppetlabs/beaker/compare/4.
|
14
|
+
# [Unreleased](https://github.com/puppetlabs/beaker/compare/4.9.0...master)
|
15
|
+
|
16
|
+
# [4.9.0](https://github.com/puppetlabs/beaker/compare/4.8.0...4.9.0) - 2019-06-19
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
|
20
|
+
- SSH Connection failure backoff shortened (BKR-1599)
|
15
21
|
|
16
22
|
# [4.8.0](https://github.com/puppetlabs/beaker/compare/4.7.0...4.8.0) - 2019-04-17
|
17
23
|
|
@@ -21,6 +27,7 @@ git logs & PR history.
|
|
21
27
|
- Codenames for Ubuntu 18.10, 19.04, and 19.10
|
22
28
|
|
23
29
|
### Changed
|
30
|
+
|
24
31
|
- Remove "repos-pe" prefix for repo filenames
|
25
32
|
|
26
33
|
# [4.7.0](https://github.com/puppetlabs/beaker/compare/4.6.0...4.7.0) - 2019-04-17
|
@@ -31,6 +38,7 @@ git logs & PR history.
|
|
31
38
|
- enable Solaris10Sparc pkgutil SSL CA2 (IMAGES-844)
|
32
39
|
|
33
40
|
### Changed
|
41
|
+
|
34
42
|
- update pry-byebug dependency 3.4.2->3.6 (BKR-1568)
|
35
43
|
- disabling hostkey checks for cisco hosts (QENG-7108)
|
36
44
|
- Change behavior of ruby versioning to accept job-parameter RUBY\_VER
|
@@ -198,28 +198,9 @@ module Beaker
|
|
198
198
|
|
199
199
|
def execute command, options = {}, stdout_callback = nil,
|
200
200
|
stderr_callback = stdout_callback
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
begin
|
205
|
-
# ensure that we have a current connection object
|
206
|
-
connect
|
207
|
-
result = try_to_execute(command, options, stdout_callback, stderr_callback)
|
208
|
-
rescue *RETRYABLE_EXCEPTIONS => e
|
209
|
-
if try < 11
|
210
|
-
sleep wait
|
211
|
-
(last_wait, wait) = wait, last_wait + wait
|
212
|
-
try += 1
|
213
|
-
@logger.error "Command execution '#{@hostname}$ #{command}' failed (#{e.class.name} - #{e.message})"
|
214
|
-
close
|
215
|
-
@logger.debug "Preparing to retry: closed ssh object"
|
216
|
-
retry
|
217
|
-
else
|
218
|
-
raise
|
219
|
-
end
|
220
|
-
end
|
221
|
-
|
222
|
-
result
|
201
|
+
# ensure that we have a current connection object
|
202
|
+
connect
|
203
|
+
try_to_execute(command, options, stdout_callback, stderr_callback)
|
223
204
|
end
|
224
205
|
|
225
206
|
def request_terminal_for channel, command
|
data/lib/beaker/version.rb
CHANGED
@@ -86,24 +86,11 @@ module Beaker
|
|
86
86
|
end
|
87
87
|
|
88
88
|
describe '#execute' do
|
89
|
-
it '
|
89
|
+
it 'raises an error if it fails' do
|
90
90
|
mock_ssh = Object.new
|
91
91
|
expect( Net::SSH ).to receive( :start ).with( ip, user, ssh_opts) { mock_ssh }
|
92
92
|
connection.connect
|
93
93
|
|
94
|
-
allow( subject ).to receive( :close )
|
95
|
-
expect( subject ).to receive( :try_to_execute ).ordered.once { raise Timeout::Error }
|
96
|
-
expect( subject ).to receive( :try_to_execute ).ordered.once { Beaker::Result.new('name', 'ls') }
|
97
|
-
expect( subject ).to_not receive( :try_to_execute )
|
98
|
-
connection.execute('ls')
|
99
|
-
end
|
100
|
-
|
101
|
-
it 'raises an error if it fails both times' do
|
102
|
-
mock_ssh = Object.new
|
103
|
-
expect( Net::SSH ).to receive( :start ).with( ip, user, ssh_opts) { mock_ssh }
|
104
|
-
connection.connect
|
105
|
-
|
106
|
-
allow( subject ).to receive( :close )
|
107
94
|
allow( subject ).to receive( :try_to_execute ) { raise Timeout::Error }
|
108
95
|
|
109
96
|
expect{ connection.execute('ls') }.to raise_error Timeout::Error
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|