Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-24 09:09:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-24 09:09:01 +0300
commitfa7ac2663b53f61551b9db51f16d55fa4e5b74c3 (patch)
tree0cbf33baee16b10803c1d23ec9e0c06e238e43f5 /spec/workers/repository_update_remote_mirror_worker_spec.rb
parent4870899d6cec693b58acbef91636e1310160fa28 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/repository_update_remote_mirror_worker_spec.rb')
-rw-r--r--spec/workers/repository_update_remote_mirror_worker_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/workers/repository_update_remote_mirror_worker_spec.rb b/spec/workers/repository_update_remote_mirror_worker_spec.rb
index 7bc499d480d..b81b492167a 100644
--- a/spec/workers/repository_update_remote_mirror_worker_spec.rb
+++ b/spec/workers/repository_update_remote_mirror_worker_spec.rb
@@ -6,10 +6,10 @@ describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_state do
subject { described_class.new }
let(:remote_mirror) { create(:remote_mirror) }
- let(:scheduled_time) { Time.now - 5.minutes }
+ let(:scheduled_time) { Time.current - 5.minutes }
around do |example|
- Timecop.freeze(Time.now) { example.run }
+ Timecop.freeze(Time.current) { example.run }
end
def expect_mirror_service_to_return(mirror, result, tries = 0)
@@ -26,7 +26,7 @@ describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_state do
end
it 'does not do anything if the mirror was already updated' do
- remote_mirror.update(last_update_started_at: Time.now, update_status: :finished)
+ remote_mirror.update(last_update_started_at: Time.current, update_status: :finished)
expect(Projects::UpdateRemoteMirrorService).not_to receive(:new)
@@ -48,7 +48,7 @@ describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_state do
expect_next_instance_of(Projects::UpdateRemoteMirrorService) do |service|
expect(service).to receive(:execute).with(remote_mirror, 1).and_raise('Unexpected!')
end
- expect { subject.perform(remote_mirror.id, Time.now, 1) }.to raise_error('Unexpected!')
+ expect { subject.perform(remote_mirror.id, Time.current, 1) }.to raise_error('Unexpected!')
lease = Gitlab::ExclusiveLease.new("#{described_class.name}:#{remote_mirror.id}", timeout: 1.second)