diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-10-17 16:06:52 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-11-02 18:11:44 +0100 |
commit | 534f6b1125313b850f8c68b90ca400ba3020417f (patch) | |
tree | bb5fb2babbe443543c4d3832679d7e3dfb2993ac /spec | |
parent | 929418da32bef6e56c363a0f7bb1ffe27edf511c (diff) | |
download | gitlab-ce-534f6b1125313b850f8c68b90ca400ba3020417f.tar.gz |
Tests for Web transaction and remove simple transacton
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/metrics/instrumentation_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/metrics/subscribers/action_view_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/metrics/subscribers/active_record_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/metrics/web_transaction_spec.rb (renamed from spec/lib/gitlab/metrics/transaction_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/metrics_spec.rb | 6 | ||||
-rw-r--r-- | spec/lib/gitlab/middleware/rails_queue_duration_spec.rb | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/spec/lib/gitlab/metrics/instrumentation_spec.rb b/spec/lib/gitlab/metrics/instrumentation_spec.rb index 28f8c681263..977bc250049 100644 --- a/spec/lib/gitlab/metrics/instrumentation_spec.rb +++ b/spec/lib/gitlab/metrics/instrumentation_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Gitlab::Metrics::Instrumentation do let(:env) { {} } - let(:transaction) { Gitlab::Metrics::Transaction.new(env) } + let(:transaction) { Gitlab::Metrics::WebTransaction.new(env) } before do @dummy = Class.new do diff --git a/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb b/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb index 3d811aa267a..b2887911194 100644 --- a/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb +++ b/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Gitlab::Metrics::Subscribers::ActionView do let(:env) { {} } - let(:transaction) { Gitlab::Metrics::Transaction.new(env) } + let(:transaction) { Gitlab::Metrics::WebTransaction.new(env) } let(:subscriber) { described_class.new } diff --git a/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb b/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb index 157be2578e9..ef2945970c1 100644 --- a/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb +++ b/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Gitlab::Metrics::Subscribers::ActiveRecord do let(:env) { {} } - let(:transaction) { Gitlab::Metrics::Transaction.new(env) } + let(:transaction) { Gitlab::Metrics::WebTransaction.new(env) } let(:subscriber) { described_class.new } let(:event) do diff --git a/spec/lib/gitlab/metrics/transaction_spec.rb b/spec/lib/gitlab/metrics/web_transaction_spec.rb index 19c2d0a2b0b..1d162f53a13 100644 --- a/spec/lib/gitlab/metrics/transaction_spec.rb +++ b/spec/lib/gitlab/metrics/web_transaction_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Metrics::Transaction do +describe Gitlab::Metrics::WebTransaction do let(:env) { {} } let(:transaction) { described_class.new(env) } diff --git a/spec/lib/gitlab/metrics_spec.rb b/spec/lib/gitlab/metrics_spec.rb index 906abdac47c..1619fbd88b1 100644 --- a/spec/lib/gitlab/metrics_spec.rb +++ b/spec/lib/gitlab/metrics_spec.rb @@ -115,7 +115,7 @@ describe Gitlab::Metrics do end context 'with a transaction' do - let(:transaction) { Gitlab::Metrics::Transaction.new({}) } + let(:transaction) { Gitlab::Metrics::WebTransaction.new({}) } before do allow(described_class).to receive(:current_transaction) @@ -155,7 +155,7 @@ describe Gitlab::Metrics do context 'with a transaction' do it 'sets the action of a transaction' do - trans = Gitlab::Metrics::Transaction.new({}) + trans = Gitlab::Metrics::WebTransaction.new({}) expect(described_class).to receive(:current_transaction) .and_return(trans) @@ -185,7 +185,7 @@ describe Gitlab::Metrics do context 'with a transaction' do it 'adds an event' do - transaction = Gitlab::Metrics::Transaction.new({}) + transaction = Gitlab::Metrics::WebTransaction.new({}) expect(transaction).to receive(:add_event).with(:meow) diff --git a/spec/lib/gitlab/middleware/rails_queue_duration_spec.rb b/spec/lib/gitlab/middleware/rails_queue_duration_spec.rb index b14c4477590..e64c4884fef 100644 --- a/spec/lib/gitlab/middleware/rails_queue_duration_spec.rb +++ b/spec/lib/gitlab/middleware/rails_queue_duration_spec.rb @@ -4,7 +4,7 @@ describe Gitlab::Middleware::RailsQueueDuration do let(:app) { double(:app) } let(:middleware) { described_class.new(app) } let(:env) { {} } - let(:transaction) { Gitlab::Metrics::Transaction.new(env) } + let(:transaction) { Gitlab::Metrics::WebTransaction.new(env) } before do expect(app).to receive(:call).with(env).and_return('yay') |