Commit a4df30c3 authored by Toon Claes's avatar Toon Claes

Switch to timestamp with time zone

parent f7d26635
......@@ -14,7 +14,7 @@ module EE
project_registry.assign_attributes(
last_repository_check_failed: !healthy,
last_repository_check_at: Time.now
last_repository_check_at: Time.zone.now
)
project_registry.save!
end
......
......@@ -8,6 +8,6 @@ class AddRepositoryCheckToGeoProjectRegistry < ActiveRecord::Migration
def change
add_column :project_registry, :last_repository_check_failed, :boolean
add_column :project_registry, :last_repository_check_at, :datetime
add_column :project_registry, :last_repository_check_at, :datetime_with_timezone
end
end
......@@ -38,5 +38,13 @@ describe EE::RepositoryCheck::SingleRepositoryWorker do
expect(project_registry.last_repository_check_failed).to be_falsy
end
it 'creates Geo registry when not yet exists' do
project_registry.destroy!
worker.perform(project.id)
expect(Geo::ProjectRegistry.find_by!(project: project.id).last_repository_check_failed).to be_falsy
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment