beaker-task_helper 1.1.0 → 1.2.0

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: 260b636cab7f87c21df1ecf2cdcf861010d26846
4
- data.tar.gz: cd13935358710badae2c8eaf27b2bd590e9cf658
3
+ metadata.gz: 88d7c18680282490328a217db93b882d00a37d56
4
+ data.tar.gz: 31f9f515613511823ac75c3bb0c72c2e9a448e98
5
5
  SHA512:
6
- metadata.gz: 779ce2f9bde38892dfecdf8868e6e920c231bf5dde2411959db6ada5a12138103c5b499a7d9ed80fb8d616e04bd3e59908ef77291be78cbb3a2d8639f55f2ba0
7
- data.tar.gz: f431c134a371d38e7442d501fefaa8d3358f5601645d2586f8ba059abf5bcca2de6edf27bf61abbf458303fee76c4c1a5059f8581b237a9e68b6b3b81dd5a31d
6
+ metadata.gz: 90b748cbbe7ac03e3275f4e66a0fdcdddc917b98872e6913814b978426c67776d24fb40bd3437eb64a2ee172769d85f2dce052b46b359e81080ae387fed77950
7
+ data.tar.gz: 2f3ba90db5a68378b252e66a3a429cd5520b8d1bca40de26829e8ef8568b01615a534912d1e25a3a1295849e0989ead3f6bf9f582bf4f285ae74504bfe336878
data/.gitignore CHANGED
@@ -9,6 +9,7 @@
9
9
  /tmp/
10
10
  /log/
11
11
  *.gem
12
+ /.idea/
12
13
 
13
14
  # rspec failure tracking
14
15
  .rspec_status
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ### 1.2.0
4
+
5
+ * run_task now takes host as a parameter.
6
+ * task_summary_line provides a generic way for checking bolt or pe success.
7
+ * Tests added
8
+
3
9
  ### 1.1.0
4
10
 
5
11
  * Better windows support.
@@ -48,11 +48,13 @@ INSTALL_BOLT_PP
48
48
  on(master, puppet('access', 'login', '--username', user, '--lifetime', lifetime), stdin: password)
49
49
  end
50
50
 
51
- def run_task(task_name:, params: nil, password: DEFAULT_PASSWORD, format: 'human')
51
+ def run_task(task_name:, params: nil, password: DEFAULT_PASSWORD, host: nil, format: 'human')
52
52
  output = if pe_install?
53
- run_puppet_task(task_name: task_name, params: params)
53
+ host = master.hostname if host.nil?
54
+ run_puppet_task(task_name: task_name, params: params, host: host)
54
55
  else
55
- run_bolt_task(task_name: task_name, params: params, password: password)
56
+ host = 'localhost' if host.nil?
57
+ run_bolt_task(task_name: task_name, params: params, password: password, host: host)
56
58
  end
57
59
 
58
60
  if format == 'json'
@@ -105,6 +107,10 @@ INSTALL_BOLT_PP
105
107
  expect(result).to match(regex)
106
108
  end
107
109
  end
110
+
111
+ def task_summary_line(total_hosts: 1, success_hosts: 1)
112
+ "Job completed. #{success_hosts}/#{total_hosts} nodes succeeded|Ran on #{total_hosts} node"
113
+ end
108
114
  end
109
115
 
110
116
  include Beaker::TaskHelper
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module TaskHelper
3
- VERSION = '1.1.0'.freeze
3
+ VERSION = '1.2.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-task_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - puppet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-13 00:00:00.000000000 Z
11
+ date: 2017-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop