diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-28 16:14:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-28 16:14:44 +0300 |
commit | e7b5a68daecd0aff0cc66666cb38c7971027a05a (patch) | |
tree | b153db785557cc807da5e623cb130a1ef384926e /spec/lib/gitlab/database_spec.rb | |
parent | c8fb2e6a3942330079bde06d919cd33c6bc7600e (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/lib/gitlab/database_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database_spec.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/spec/lib/gitlab/database_spec.rb b/spec/lib/gitlab/database_spec.rb index 47d2cb05240..420aa0a8df6 100644 --- a/spec/lib/gitlab/database_spec.rb +++ b/spec/lib/gitlab/database_spec.rb @@ -109,46 +109,6 @@ RSpec.describe Gitlab::Database do end end - describe '.postgresql_upcoming_deprecation?' do - it 'returns true when database version is lower than the upcoming minimum' do - allow(described_class).to receive(:version).and_return('11') - - expect(described_class.postgresql_upcoming_deprecation?).to eq(true) - end - - it 'returns false when database version equals the upcoming minimum' do - allow(described_class).to receive(:version).and_return('12') - - expect(described_class.postgresql_upcoming_deprecation?).to eq(false) - end - - it 'returns false when database version is greater the upcoming minimum' do - allow(described_class).to receive(:version).and_return('13') - - expect(described_class.postgresql_upcoming_deprecation?).to eq(false) - end - end - - describe '.within_deprecation_notice_window?' do - using RSpec::Parameterized::TableSyntax - - where(:case_name, :days, :result) do - 'outside window' | Gitlab::Database::DEPRECATION_WINDOW_DAYS + 1 | false - 'equal to window' | Gitlab::Database::DEPRECATION_WINDOW_DAYS | true - 'within window' | Gitlab::Database::DEPRECATION_WINDOW_DAYS - 1 | true - end - - with_them do - it "returns #{params[:result]} when #{params[:case_name]}" do - allow(Date) - .to receive(:today) - .and_return Date.parse(Gitlab::Database::UPCOMING_POSTGRES_VERSION_DETAILS[:gl_version_date]) - days - - expect(described_class.within_deprecation_notice_window?).to eq(result) - end - end - end - describe '.check_postgres_version_and_print_warning' do subject { described_class.check_postgres_version_and_print_warning } |