summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/database/migration_helpers/wraparound_vacuum_helpers_spec.rb6
-rw-r--r--spec/lib/gitlab/redis/cache_spec.rb8
-rw-r--r--spec/lib/gitlab/redis/db_load_balancing_spec.rb8
-rw-r--r--spec/lib/gitlab/redis/queues_spec.rb8
-rw-r--r--spec/lib/gitlab/redis/repository_cache_spec.rb8
-rw-r--r--spec/lib/gitlab/redis/shared_state_spec.rb8
-rw-r--r--spec/lib/gitlab/redis/sidekiq_status_spec.rb8
7 files changed, 2 insertions, 52 deletions
diff --git a/spec/lib/gitlab/database/migration_helpers/wraparound_vacuum_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers/wraparound_vacuum_helpers_spec.rb
index eb67e81f677..f7d11184ac7 100644
--- a/spec/lib/gitlab/database/migration_helpers/wraparound_vacuum_helpers_spec.rb
+++ b/spec/lib/gitlab/database/migration_helpers/wraparound_vacuum_helpers_spec.rb
@@ -36,7 +36,7 @@ RSpec.describe Gitlab::Database::MigrationHelpers::WraparoundVacuumHelpers, feat
context 'with wraparound vacuuum running' do
before do
- swapout_view_for_table(:pg_stat_activity, connection: migration.connection)
+ swapout_view_for_table(:pg_stat_activity, connection: migration.connection, schema: 'pg_temp')
migration.connection.execute(<<~SQL.squish)
INSERT INTO pg_stat_activity (
@@ -44,7 +44,7 @@ RSpec.describe Gitlab::Database::MigrationHelpers::WraparoundVacuumHelpers, feat
state_change, wait_event_type, wait_event, state, backend_xmin,
query, backend_type)
VALUES (
- 16401, 'gitlabhq_dblab', 178, '2023-03-30 08:10:50.851322+00',
+ 16401, current_database(), 178, '2023-03-30 08:10:50.851322+00',
'2023-03-30 08:10:50.890485+00', now() - '150 minutes'::interval,
'2023-03-30 08:10:50.890485+00', 'IO', 'DataFileRead', 'active','3214790381'::xid,
'autovacuum: VACUUM public.ci_builds (to prevent wraparound)', 'autovacuum worker')
@@ -58,8 +58,6 @@ RSpec.describe Gitlab::Database::MigrationHelpers::WraparoundVacuumHelpers, feat
it { expect { subject }.to output(/autovacuum: VACUUM public.ci_builds \(to prevent wraparound\)/).to_stdout }
it { expect { subject }.to output(/Current duration: 2 hours, 30 minutes/).to_stdout }
- it { expect { subject }.to output(/Process id: 178/).to_stdout }
- it { expect { subject }.to output(/`select pg_cancel_backend\(178\);`/).to_stdout }
context 'when GITLAB_MIGRATIONS_DISABLE_WRAPAROUND_CHECK is set' do
before do
diff --git a/spec/lib/gitlab/redis/cache_spec.rb b/spec/lib/gitlab/redis/cache_spec.rb
index 82ff8a26199..30770a47b84 100644
--- a/spec/lib/gitlab/redis/cache_spec.rb
+++ b/spec/lib/gitlab/redis/cache_spec.rb
@@ -8,14 +8,6 @@ RSpec.describe Gitlab::Redis::Cache do
include_examples "redis_shared_examples"
- describe '#raw_config_hash' do
- it 'has a legacy default URL' do
- expect(subject).to receive(:fetch_config) { false }
-
- expect(subject.send(:raw_config_hash)).to eq(url: 'redis://localhost:6380' )
- end
- end
-
describe '.active_support_config' do
it 'has a default ttl of 8 hours' do
expect(described_class.active_support_config[:expires_in]).to eq(8.hours)
diff --git a/spec/lib/gitlab/redis/db_load_balancing_spec.rb b/spec/lib/gitlab/redis/db_load_balancing_spec.rb
index d633413ddec..d3d3ced62a9 100644
--- a/spec/lib/gitlab/redis/db_load_balancing_spec.rb
+++ b/spec/lib/gitlab/redis/db_load_balancing_spec.rb
@@ -41,12 +41,4 @@ RSpec.describe Gitlab::Redis::DbLoadBalancing, feature_category: :scalability do
it_behaves_like 'multi store feature flags', :use_primary_and_secondary_stores_for_db_load_balancing,
:use_primary_store_as_default_for_db_load_balancing
end
-
- describe '#raw_config_hash' do
- it 'has a legacy default URL' do
- expect(subject).to receive(:fetch_config).and_return(false)
-
- expect(subject.send(:raw_config_hash)).to eq(url: 'redis://localhost:6382')
- end
- end
end
diff --git a/spec/lib/gitlab/redis/queues_spec.rb b/spec/lib/gitlab/redis/queues_spec.rb
index a0f73a654e7..ec324f86cab 100644
--- a/spec/lib/gitlab/redis/queues_spec.rb
+++ b/spec/lib/gitlab/redis/queues_spec.rb
@@ -13,14 +13,6 @@ RSpec.describe Gitlab::Redis::Queues do
expect(subject).to receive(:fetch_config) { config }
end
- context 'when the config url is blank' do
- let(:config) { nil }
-
- it 'has a legacy default URL' do
- expect(subject.send(:raw_config_hash)).to eq(url: 'redis://localhost:6381' )
- end
- end
-
context 'when the config url is present' do
let(:config) { { url: 'redis://localhost:1111' } }
diff --git a/spec/lib/gitlab/redis/repository_cache_spec.rb b/spec/lib/gitlab/redis/repository_cache_spec.rb
index 8cdc4580f9e..bc48ee208c1 100644
--- a/spec/lib/gitlab/redis/repository_cache_spec.rb
+++ b/spec/lib/gitlab/redis/repository_cache_spec.rb
@@ -5,14 +5,6 @@ require 'spec_helper'
RSpec.describe Gitlab::Redis::RepositoryCache, feature_category: :scalability do
include_examples "redis_new_instance_shared_examples", 'repository_cache', Gitlab::Redis::Cache
- describe '#raw_config_hash' do
- it 'has a legacy default URL' do
- expect(subject).to receive(:fetch_config).and_return(false)
-
- expect(subject.send(:raw_config_hash)).to eq(url: 'redis://localhost:6380')
- end
- end
-
describe '.cache_store' do
it 'has a default ttl of 8 hours' do
expect(described_class.cache_store.options[:expires_in]).to eq(8.hours)
diff --git a/spec/lib/gitlab/redis/shared_state_spec.rb b/spec/lib/gitlab/redis/shared_state_spec.rb
index d240abfbf5b..76b60440b2c 100644
--- a/spec/lib/gitlab/redis/shared_state_spec.rb
+++ b/spec/lib/gitlab/redis/shared_state_spec.rb
@@ -7,12 +7,4 @@ RSpec.describe Gitlab::Redis::SharedState do
let(:environment_config_file_name) { "GITLAB_REDIS_SHARED_STATE_CONFIG_FILE" }
include_examples "redis_shared_examples"
-
- describe '#raw_config_hash' do
- it 'has a legacy default URL' do
- expect(subject).to receive(:fetch_config) { false }
-
- expect(subject.send(:raw_config_hash)).to eq(url: 'redis://localhost:6382' )
- end
- end
end
diff --git a/spec/lib/gitlab/redis/sidekiq_status_spec.rb b/spec/lib/gitlab/redis/sidekiq_status_spec.rb
index bbfec13e6c8..cbd2c05ce23 100644
--- a/spec/lib/gitlab/redis/sidekiq_status_spec.rb
+++ b/spec/lib/gitlab/redis/sidekiq_status_spec.rb
@@ -49,14 +49,6 @@ RSpec.describe Gitlab::Redis::SidekiqStatus do
:use_primary_store_as_default_for_sidekiq_status
end
- describe '#raw_config_hash' do
- it 'has a legacy default URL' do
- expect(subject).to receive(:fetch_config) { false }
-
- expect(subject.send(:raw_config_hash)).to eq(url: 'redis://localhost:6382')
- end
- end
-
describe '#store_name' do
it 'returns the name of the SharedState store' do
expect(described_class.store_name).to eq('SharedState')