foreman_rh_cloud 8.0.49 → 8.0.50

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
  SHA256:
3
- metadata.gz: 0cedd47c0a845f1b043329ed3c2487bb781d7807667e8c1608c0f7204f0734ff
4
- data.tar.gz: 3ac8c4184db82abea338841e9783181acfdb5c75dd9ee2bca4bf2dcc401ef5a0
3
+ metadata.gz: 7cea22a0b284bca946fd3911d2225a4dc3af7207b458dcab9405e29427f8c9a7
4
+ data.tar.gz: 46a5c322b515ac02c73a10b7b79f1d8195c9f3cf57a42df08c07d814190c5d62
5
5
  SHA512:
6
- metadata.gz: b5e70d7b496792133a6d32ae8daeb2016b884eed3167936f0bd60e45146a36ee57201f61136c8440d4a992b7a7e7cc60a0cfca8ae9f703431ebc0f58fb44507a
7
- data.tar.gz: 15c2c3df4d42ba65f84aabcb5875534a3e07f5dd1e684ed21574c5d5103639ee9fda51e62f45c53b52ffba92ca9e16b04a1eb3b40894c850921e78fc0e959ef3
6
+ metadata.gz: 39ccb8d56628449026625a4781fc1343c8fc6eef22ab96f139d0d9bc9dd3e107d0a92f69917f4136f1d4e5744ccfb5528e2fb52d98ca57d544a6a420990a223b
7
+ data.tar.gz: 32c33fdb90216680056868fea097b665ab2a8dca2559dfd6ebd2574757d3f9811f34a1f5d092a3a065b5284bca4de1b63ff6678ce7994e66685acd857cd34e43
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '8.0.49'.freeze
2
+ VERSION = '8.0.50'.freeze
3
3
  end
@@ -144,7 +144,7 @@ module InsightsCloud
144
144
  {
145
145
  'state' => host_task.state,
146
146
  'output' => host_task.main_action.live_output.map { |line| line['output'] }.join("\n"),
147
- 'exit_status' => host_task.main_action.exit_status,
147
+ 'exit_status' => ActiveModel::Type::Integer.new.cast(host_task.main_action.exit_status),
148
148
  'sequence' => sequence(host_name),
149
149
  'report_done' => host_done?(host_name),
150
150
  }
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "8.0.49",
3
+ "version": "8.0.50",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -43,6 +43,10 @@ class ConnectorPlaybookExecutionReporterTaskTest < ActiveSupport::TestCase
43
43
  assert_not_nil actual_report
44
44
  actual_jsonl = read_jsonl(actual_report)
45
45
 
46
+ assert_equal true, actual.output['task']['invocation_status']['task_state']['task_done_reported']
47
+ assert_equal 0, actual.output['task']['invocation_status']['hosts_state']['TEST_UUID1']['exit_status']
48
+ assert_equal 0, actual.output['task']['invocation_status']['hosts_state']['TEST_UUID2']['exit_status']
49
+
46
50
  assert_equal true, @job_invocation.finished?
47
51
  assert_equal 'stopped', @job_invocation.sub_task_for_host(Host.where(name: 'host1').first)['state']
48
52
 
@@ -85,6 +89,9 @@ class ConnectorPlaybookExecutionReporterTaskTest < ActiveSupport::TestCase
85
89
  actual_json1 = read_jsonl(actual_report1)
86
90
  actual_json2 = read_jsonl(actual_report2)
87
91
 
92
+ assert_equal true, actual.output['task']['invocation_status']['task_state']['task_done_reported']
93
+ assert_equal 0, actual.output['task']['invocation_status']['hosts_state']['TEST_UUID1']['exit_status']
94
+
88
95
  assert_equal 'stopped', @job_invocation.sub_task_for_host(Host.where(name: 'host1').first)['state']
89
96
 
90
97
  assert_not_nil actual_report_updated = actual_json1.find { |l| l['type'] == 'playbook_run_update' && l['host'] == 'TEST_UUID1' }
@@ -149,6 +156,9 @@ class ConnectorPlaybookExecutionReporterTaskTest < ActiveSupport::TestCase
149
156
  actual_json2 = read_jsonl(actual_report2)
150
157
  actual_json3 = read_jsonl(actual_report3)
151
158
 
159
+ assert_equal true, actual.output['task']['invocation_status']['task_state']['task_done_reported']
160
+ assert_equal 0, actual.output['task']['invocation_status']['hosts_state']['TEST_UUID1']['exit_status']
161
+
152
162
  assert_not_nil actual_report_updated = actual_json1.find { |l| l['type'] == 'playbook_run_update' && l['host'] == 'TEST_UUID1' }
153
163
  assert_equal 'TEST_CORRELATION', actual_report_updated['correlation_id']
154
164
  assert_equal 'TEST_UUID1', actual_report_updated['host']
@@ -263,7 +273,7 @@ class ConnectorPlaybookExecutionReporterTaskTest < ActiveSupport::TestCase
263
273
  { 'timestamp' => (Time.now - (5 - i)).to_f, 'output' => "#{i}\n" }
264
274
  end
265
275
  Support::DummyDynflowAction.any_instance.stubs(:live_output).returns(fake_output)
266
- Support::DummyDynflowAction.any_instance.stubs(:exit_status).returns(0)
276
+ Support::DummyDynflowAction.any_instance.stubs(:exit_status).returns("0")
267
277
 
268
278
  job_invocation
269
279
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.49
4
+ version: 8.0.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-13 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello