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:
Diffstat (limited to 'spec/tasks/migrate/schema_check_rake_spec.rb')
-rw-r--r--spec/tasks/migrate/schema_check_rake_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/tasks/migrate/schema_check_rake_spec.rb b/spec/tasks/migrate/schema_check_rake_spec.rb
index 1b60b63ad84..ede55f23ba8 100644
--- a/spec/tasks/migrate/schema_check_rake_spec.rb
+++ b/spec/tasks/migrate/schema_check_rake_spec.rb
@@ -5,6 +5,7 @@ require 'rake'
RSpec.describe 'schema_version_check rake task', :silence_stdout do
include StubENV
+ let(:valid_schema_version) { 20211004170422 }
before :all do
Rake.application.rake_require 'active_record/railties/databases'
@@ -15,8 +16,8 @@ RSpec.describe 'schema_version_check rake task', :silence_stdout do
end
before do
- allow(ActiveRecord::Migrator).to receive(:current_version).and_return(Gitlab::Database::MIN_SCHEMA_VERSION)
-
+ allow(ActiveRecord::Migrator).to receive(:current_version).and_return(valid_schema_version)
+ allow(Gitlab::Database).to receive(:read_minimum_migration_version).and_return(valid_schema_version)
# Ensure our check can re-run each time
Rake::Task[:schema_version_check].reenable
end