diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-22 00:08:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-22 00:08:28 +0300 |
commit | 0a93f691bf210da97fcefe0ddf80b38b0b186a99 (patch) | |
tree | cf17fdecf913d0576a4ec3eba0b3704c06c86470 /spec/lib/gitlab/database/background_migration | |
parent | 07d811cd3cf4d3a1802363532756bf69cfc6346f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/database/background_migration')
-rw-r--r-- | spec/lib/gitlab/database/background_migration/health_status_spec.rb | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/spec/lib/gitlab/database/background_migration/health_status_spec.rb b/spec/lib/gitlab/database/background_migration/health_status_spec.rb index e14440f1fb4..4d6c729f080 100644 --- a/spec/lib/gitlab/database/background_migration/health_status_spec.rb +++ b/spec/lib/gitlab/database/background_migration/health_status_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::Database::BackgroundMigration::HealthStatus do +RSpec.describe Gitlab::Database::BackgroundMigration::HealthStatus, feature_category: :database do let(:connection) { Gitlab::Database.database_base_models[:main].connection } around do |example| @@ -55,10 +55,23 @@ RSpec.describe Gitlab::Database::BackgroundMigration::HealthStatus do end it 'logs interesting signals' do - signal = instance_double("#{health_status}::Signals::Stop", log_info?: true) + signal = instance_double( + "#{health_status}::Signals::Stop", + log_info?: true, + indicator_class: autovacuum_indicator_class, + short_name: 'Stop', + reason: 'Test Exception' + ) expect(autovacuum_indicator).to receive(:evaluate).and_return(signal) - expect(described_class).to receive(:log_signal).with(signal, migration) + + expect(Gitlab::BackgroundMigration::Logger).to receive(:info).with( + migration_id: migration.id, + health_status_indicator: autovacuum_indicator_class.to_s, + indicator_signal: 'Stop', + signal_reason: 'Test Exception', + message: "#{migration} signaled: #{signal}" + ) evaluate end |