diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
commit | be834a25982746ffd85252ff502df42bb88cb9d5 (patch) | |
tree | b4d6a8ba0931e12fac08f05abea33a3b8ec2c8a2 /spec/lib/gitlab/database_spec.rb | |
parent | ee925a3597f27e92f83a50937a64068109675b3d (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc32
Diffstat (limited to 'spec/lib/gitlab/database_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database_spec.rb | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/spec/lib/gitlab/database_spec.rb b/spec/lib/gitlab/database_spec.rb index 420aa0a8df6..dd3daf1b2c5 100644 --- a/spec/lib/gitlab/database_spec.rb +++ b/spec/lib/gitlab/database_spec.rb @@ -70,25 +70,6 @@ RSpec.describe Gitlab::Database do end end - describe '.postgresql_9_or_less?' do - it 'returns true when using postgresql 8.4' do - allow(described_class).to receive(:version).and_return('8.4') - expect(described_class.postgresql_9_or_less?).to eq(true) - end - - it 'returns true when using PostgreSQL 9.6' do - allow(described_class).to receive(:version).and_return('9.6') - - expect(described_class.postgresql_9_or_less?).to eq(true) - end - - it 'returns false when using PostgreSQL 10 or newer' do - allow(described_class).to receive(:version).and_return('10') - - expect(described_class.postgresql_9_or_less?).to eq(false) - end - end - describe '.postgresql_minimum_supported_version?' do it 'returns false when using PostgreSQL 10' do allow(described_class).to receive(:version).and_return('10') @@ -150,68 +131,6 @@ RSpec.describe Gitlab::Database do end end - describe '.pg_wal_lsn_diff' do - it 'returns old name when using PostgreSQL 9.6' do - allow(described_class).to receive(:version).and_return('9.6') - - expect(described_class.pg_wal_lsn_diff).to eq('pg_xlog_location_diff') - end - - it 'returns new name when using PostgreSQL 10 or newer' do - allow(described_class).to receive(:version).and_return('10') - - expect(described_class.pg_wal_lsn_diff).to eq('pg_wal_lsn_diff') - end - end - - describe '.pg_current_wal_insert_lsn' do - it 'returns old name when using PostgreSQL 9.6' do - allow(described_class).to receive(:version).and_return('9.6') - - expect(described_class.pg_current_wal_insert_lsn).to eq('pg_current_xlog_insert_location') - end - - it 'returns new name when using PostgreSQL 10 or newer' do - allow(described_class).to receive(:version).and_return('10') - - expect(described_class.pg_current_wal_insert_lsn).to eq('pg_current_wal_insert_lsn') - end - end - - describe '.pg_last_wal_receive_lsn' do - it 'returns old name when using PostgreSQL 9.6' do - allow(described_class).to receive(:version).and_return('9.6') - - expect(described_class.pg_last_wal_receive_lsn).to eq('pg_last_xlog_receive_location') - end - - it 'returns new name when using PostgreSQL 10 or newer' do - allow(described_class).to receive(:version).and_return('10') - - expect(described_class.pg_last_wal_receive_lsn).to eq('pg_last_wal_receive_lsn') - end - end - - describe '.pg_last_wal_replay_lsn' do - it 'returns old name when using PostgreSQL 9.6' do - allow(described_class).to receive(:version).and_return('9.6') - - expect(described_class.pg_last_wal_replay_lsn).to eq('pg_last_xlog_replay_location') - end - - it 'returns new name when using PostgreSQL 10 or newer' do - allow(described_class).to receive(:version).and_return('10') - - expect(described_class.pg_last_wal_replay_lsn).to eq('pg_last_wal_replay_lsn') - end - end - - describe '.pg_last_xact_replay_timestamp' do - it 'returns pg_last_xact_replay_timestamp' do - expect(described_class.pg_last_xact_replay_timestamp).to eq('pg_last_xact_replay_timestamp') - end - end - describe '.nulls_last_order' do it { expect(described_class.nulls_last_order('column', 'ASC')).to eq 'column ASC NULLS LAST'} it { expect(described_class.nulls_last_order('column', 'DESC')).to eq 'column DESC NULLS LAST'} |