diff options
author | rpereira2 <rpereira@gitlab.com> | 2019-01-31 18:00:26 +0530 |
---|---|---|
committer | rpereira2 <rpereira@gitlab.com> | 2019-02-07 10:37:05 +0530 |
commit | db5448185867354a1c616edfa8409d463952c718 (patch) | |
tree | 92bd87682a56bd0576d8a469d8cea186077ef898 | |
parent | e98ab38bfc84ab1d30b82b74a79d8a83ee6e6bbd (diff) | |
download | gitlab-ce-db5448185867354a1c616edfa8409d463952c718.tar.gz |
Remove code for working with reactive caching
-rw-r--r-- | app/services/error_tracking/list_sentry_projects_service.rb | 5 | ||||
-rw-r--r-- | spec/services/error_tracking/list_sentry_projects_service_spec.rb | 18 |
2 files changed, 0 insertions, 23 deletions
diff --git a/app/services/error_tracking/list_sentry_projects_service.rb b/app/services/error_tracking/list_sentry_projects_service.rb index 287e9134f5c..e22e5e22743 100644 --- a/app/services/error_tracking/list_sentry_projects_service.rb +++ b/app/services/error_tracking/list_sentry_projects_service.rb @@ -13,11 +13,6 @@ module ErrorTracking result = e.list_sentry_projects - # our results are not yet ready - unless result - return error('not ready', :no_content) - end - success(projects: result[:projects]) rescue Sentry::Client::Error => e diff --git a/spec/services/error_tracking/list_sentry_projects_service_spec.rb b/spec/services/error_tracking/list_sentry_projects_service_spec.rb index ec32515a91d..dfa10a1b04a 100644 --- a/spec/services/error_tracking/list_sentry_projects_service_spec.rb +++ b/spec/services/error_tracking/list_sentry_projects_service_spec.rb @@ -3,8 +3,6 @@ require 'spec_helper' describe ErrorTracking::ListSentryProjectsService do - include ReactiveCachingHelpers - set(:user) { create(:user) } set(:project) { create(:project) } @@ -32,8 +30,6 @@ describe ErrorTracking::ListSentryProjectsService do end it 'uses new api_url and token' do - synchronous_reactive_cache(error_tracking_setting) - sentry_client = spy(:sentry_client) expect(Sentry::Client).to receive(:new) @@ -86,20 +82,6 @@ describe ErrorTracking::ListSentryProjectsService do expect(result).to eq(status: :success, projects: projects) end end - - context 'when list_sentry_projects returns nil' do - before do - expect(error_tracking_setting) - .to receive(:list_sentry_projects).and_return(nil) - end - - it 'result is not ready' do - result = subject.execute - - expect(result).to eq( - status: :error, http_status: :no_content, message: 'not ready') - end - end end context 'with unauthorized user' do |