diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/lib/backup | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) | |
download | gitlab-ce-0c872e02b2c822e3397515ec324051ff540f0cd5.tar.gz |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/lib/backup')
-rw-r--r-- | spec/lib/backup/gitaly_backup_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/backup/manager_spec.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/backup/gitaly_backup_spec.rb b/spec/lib/backup/gitaly_backup_spec.rb index 6b0747735ed..7cc8ce2cbae 100644 --- a/spec/lib/backup/gitaly_backup_spec.rb +++ b/spec/lib/backup/gitaly_backup_spec.rb @@ -61,7 +61,7 @@ RSpec.describe Backup::GitalyBackup do it 'erases any existing repository backups' do existing_file = File.join(destination, 'some_existing_file') - IO.write(existing_file, "Some existing file.\n") + File.write(existing_file, "Some existing file.\n") subject.start(:create, destination, backup_id: backup_id) subject.finish! diff --git a/spec/lib/backup/manager_spec.rb b/spec/lib/backup/manager_spec.rb index f85b005f4d1..992dbec73c2 100644 --- a/spec/lib/backup/manager_spec.rb +++ b/spec/lib/backup/manager_spec.rb @@ -166,7 +166,7 @@ RSpec.describe Backup::Manager do describe '#create' do let(:incremental_env) { 'false' } let(:expected_backup_contents) { %w{backup_information.yml task1.tar.gz task2.tar.gz} } - let(:backup_time) { Time.utc(2019, 1, 1) } + let(:backup_time) { Time.zone.parse('2019-1-1') } let(:backup_id) { "1546300800_2019_01_01_#{Gitlab::VERSION}" } let(:full_backup_id) { backup_id } let(:pack_tar_file) { "#{backup_id}_gitlab_backup.tar" } @@ -284,7 +284,7 @@ RSpec.describe Backup::Manager do allow(Dir).to receive(:chdir).and_yield allow(Dir).to receive(:glob).and_return(files) allow(FileUtils).to receive(:rm) - allow(Time).to receive(:now).and_return(Time.utc(2016)) + allow(Time).to receive(:now).and_return(Time.zone.parse('2016-1-1')) end context 'when keep_time is zero' do |