foreman-tasks 7.1.1 → 7.2.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.
@@ -5,7 +5,7 @@
5
5
  # Translators:
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: Foreman\n"
8
+ "Project-Id-Version: foreman_tasks 7.1.0\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2016-02-12 14:04+0000\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -182,17 +182,14 @@ class TasksTest < ActiveSupport::TestCase
182
182
  end
183
183
 
184
184
  describe 'consistency check' do
185
- let(:consistent_task) { FactoryBot.create(:dynflow_task, :sync_with_dynflow => true) }
186
- let(:inconsistent_task) { FactoryBot.create(:dynflow_task, :inconsistent_dynflow_task) }
187
-
188
185
  it 'ensures the tasks marked as running are really running in Dynflow' do
189
- _(consistent_task.state).must_equal 'planned'
190
- _(inconsistent_task.state).must_equal 'running'
186
+ task = ForemanTasks.sync_task(Support::DummyDynflowAction)
187
+ task.update(:state => 'running') # Updating state updates the timestamp
188
+ task.update(:state_updated_at => Time.zone.now - 5.minutes)
191
189
 
192
190
  ForemanTasks::Task::DynflowTask.consistency_check
193
-
194
- _(consistent_task.reload.state).must_equal 'planned'
195
- _(inconsistent_task.reload.state).must_equal 'planned'
191
+ task.reload
192
+ _(task.state).must_equal 'stopped'
196
193
  end
197
194
  end
198
195
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.1
4
+ version: 7.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-18 00:00:00.000000000 Z
11
+ date: 2022-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynflow