summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 06:08:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 06:08:06 +0000
commit9bded6fb2268204757c35540fadef8e1b6351249 (patch)
tree4aed0a1c3deff8a073432dd40bbb3fe3b12bed83
parent25f414893f8f1dde029f60e781d195e426e514a1 (diff)
downloadgitlab-ce-9bded6fb2268204757c35540fadef8e1b6351249.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.rubocop.yml1
-rw-r--r--app/assets/javascripts/ide/components/activity_bar.vue2
-rw-r--r--app/assets/javascripts/ide/components/ide_side_bar.vue9
-rw-r--r--app/assets/javascripts/ide/components/resizable_panel.vue5
-rw-r--r--app/assets/javascripts/ide/constants.js3
-rw-r--r--app/assets/javascripts/monitoring/stores/variable_mapping.js2
-rw-r--r--app/assets/stylesheets/page_bundles/ide.scss22
-rw-r--r--app/services/search_service.rb5
-rw-r--r--changelogs/unreleased/leaky-constant-fix-29.yml5
-rw-r--r--config/initializers/fill_shards.rb5
-rw-r--r--doc/.vale/gitlab/Substitutions.yml1
-rw-r--r--doc/development/documentation/index.md2
-rw-r--r--doc/development/documentation/site_architecture/index.md2
-rw-r--r--doc/user/project/description_templates.md2
-rw-r--r--lib/api/entities/merge_request_basic.rb8
-rw-r--r--lib/api/search.rb10
-rw-r--r--lib/gitlab/project_search_results.rb2
-rw-r--r--lib/gitlab/search_results.rb2
-rw-r--r--lib/gitlab/snippet_search_results.rb2
-rw-r--r--spec/frontend/monitoring/mock_data.js37
-rw-r--r--spec/frontend/monitoring/store/variable_mapping_spec.js27
-rw-r--r--spec/lib/gitlab/sidekiq_middleware/client_metrics_spec.rb7
22 files changed, 107 insertions, 54 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 3d013a650e7..3c5771da32d 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -365,7 +365,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/lib/gitlab/no_cache_headers_spec.rb'
- 'spec/lib/gitlab/path_regex_spec.rb'
- 'spec/lib/gitlab/quick_actions/dsl_spec.rb'
- - 'spec/lib/gitlab/sidekiq_middleware/client_metrics_spec.rb'
- 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb'
- 'spec/lib/marginalia_spec.rb'
- 'spec/mailers/notify_spec.rb'
diff --git a/app/assets/javascripts/ide/components/activity_bar.vue b/app/assets/javascripts/ide/components/activity_bar.vue
index 186d4b6d7d2..2969b6b4d4d 100644
--- a/app/assets/javascripts/ide/components/activity_bar.vue
+++ b/app/assets/javascripts/ide/components/activity_bar.vue
@@ -23,6 +23,8 @@ export default {
this.updateActivityBarView(view);
+ // TODO: We must use JQuery here to interact with the Bootstrap tooltip API
+ // https://gitlab.com/gitlab-org/gitlab/-/issues/217577
$(e.currentTarget).tooltip('hide');
},
},
diff --git a/app/assets/javascripts/ide/components/ide_side_bar.vue b/app/assets/javascripts/ide/components/ide_side_bar.vue
index 7cb31df85ce..31a239092c2 100644
--- a/app/assets/javascripts/ide/components/ide_side_bar.vue
+++ b/app/assets/javascripts/ide/components/ide_side_bar.vue
@@ -9,7 +9,7 @@ import CommitForm from './commit_sidebar/form.vue';
import IdeReview from './ide_review.vue';
import SuccessMessage from './commit_sidebar/success_message.vue';
import IdeProjectHeader from './ide_project_header.vue';
-import { leftSidebarViews } from '../constants';
+import { leftSidebarViews, LEFT_SIDEBAR_INIT_WIDTH } from '../constants';
export default {
components: {
@@ -33,11 +33,16 @@ export default {
);
},
},
+ LEFT_SIDEBAR_INIT_WIDTH,
};
</script>
<template>
- <resizable-panel :initial-width="340" side="left" class="flex-column">
+ <resizable-panel
+ :initial-width="$options.LEFT_SIDEBAR_INIT_WIDTH"
+ side="left"
+ class="multi-file-commit-panel flex-column"
+ >
<template v-if="loading">
<div class="multi-file-commit-panel-inner">
<div v-for="n in 3" :key="n" class="multi-file-loading-container">
diff --git a/app/assets/javascripts/ide/components/resizable_panel.vue b/app/assets/javascripts/ide/components/resizable_panel.vue
index 86a4622401c..d55150f48ad 100644
--- a/app/assets/javascripts/ide/components/resizable_panel.vue
+++ b/app/assets/javascripts/ide/components/resizable_panel.vue
@@ -1,6 +1,7 @@
<script>
import { mapActions } from 'vuex';
import PanelResizer from '~/vue_shared/components/panel_resizer.vue';
+import { DEFAULT_SIDEBAR_MIN_WIDTH } from '../constants';
export default {
components: {
@@ -14,7 +15,7 @@ export default {
minSize: {
type: Number,
required: false,
- default: 340,
+ default: DEFAULT_SIDEBAR_MIN_WIDTH,
},
side: {
type: String,
@@ -45,7 +46,7 @@ export default {
</script>
<template>
- <div :style="panelStyle" class="multi-file-commit-panel">
+ <div :style="panelStyle">
<slot></slot>
<panel-resizer
:size.sync="width"
diff --git a/app/assets/javascripts/ide/constants.js b/app/assets/javascripts/ide/constants.js
index ae8550cba76..a5a69841792 100644
--- a/app/assets/javascripts/ide/constants.js
+++ b/app/assets/javascripts/ide/constants.js
@@ -4,6 +4,9 @@ export const MAX_WINDOW_HEIGHT_COMPACT = 750;
export const MAX_TITLE_LENGTH = 50;
export const MAX_BODY_LENGTH = 72;
+export const LEFT_SIDEBAR_INIT_WIDTH = 340;
+export const DEFAULT_SIDEBAR_MIN_WIDTH = 340;
+
// File view modes
export const FILE_VIEW_MODE_EDITOR = 'editor';
export const FILE_VIEW_MODE_PREVIEW = 'preview';
diff --git a/app/assets/javascripts/monitoring/stores/variable_mapping.js b/app/assets/javascripts/monitoring/stores/variable_mapping.js
index bfb469da19e..66b9899f673 100644
--- a/app/assets/javascripts/monitoring/stores/variable_mapping.js
+++ b/app/assets/javascripts/monitoring/stores/variable_mapping.js
@@ -47,7 +47,7 @@ const textAdvancedVariableParser = advTextVar => ({
*/
const normalizeCustomVariableOptions = ({ default: defaultOpt = false, text, value }) => ({
default: defaultOpt,
- text,
+ text: text || value,
value,
});
diff --git a/app/assets/stylesheets/page_bundles/ide.scss b/app/assets/stylesheets/page_bundles/ide.scss
index 61914740ac0..2de319b51bb 100644
--- a/app/assets/stylesheets/page_bundles/ide.scss
+++ b/app/assets/stylesheets/page_bundles/ide.scss
@@ -65,6 +65,7 @@ $ide-commit-header-height: 48px;
flex-direction: column;
flex: 1;
border-left: 1px solid var(--ide-border-color, $white-dark);
+ border-right: 1px solid var(--ide-border-color, $white-dark);
overflow: hidden;
}
@@ -584,14 +585,15 @@ $ide-commit-header-height: 48px;
background: var(--ide-highlight-background, $white);
}
- &.is-right {
- padding-right: $gl-padding;
- padding-left: $gl-padding + 1px;
+ }
- &::after {
- right: auto;
- left: -1px;
- }
+ &.is-right {
+ padding-right: $gl-padding;
+ padding-left: $gl-padding + 1px;
+
+ &::after {
+ right: auto;
+ left: -1px;
}
}
}
@@ -877,15 +879,11 @@ $ide-commit-header-height: 48px;
}
.ide-right-sidebar {
- .ide-activity-bar {
- border-left: 1px solid var(--ide-border-color, $white-dark);
- }
-
.multi-file-commit-panel-inner {
width: 350px;
padding: $grid-size 0;
background-color: var(--ide-highlight-background, $white);
- border-left: 1px solid var(--ide-border-color, $white-dark);
+ border-right: 1px solid var(--ide-border-color, $white-dark);
}
.ide-right-sidebar-jobs-detail {
diff --git a/app/services/search_service.rb b/app/services/search_service.rb
index bf21eba28f7..5453940f8b7 100644
--- a/app/services/search_service.rb
+++ b/app/services/search_service.rb
@@ -5,7 +5,6 @@ class SearchService
SEARCH_TERM_LIMIT = 64
SEARCH_CHAR_LIMIT = 4096
-
DEFAULT_PER_PAGE = Gitlab::SearchResults::DEFAULT_PER_PAGE
MAX_PER_PAGE = 200
@@ -62,8 +61,8 @@ class SearchService
@search_results ||= search_service.execute
end
- def search_objects
- @search_objects ||= redact_unauthorized_results(search_results.objects(scope, page: params[:page], per_page: per_page))
+ def search_objects(preload_method = nil)
+ @search_objects ||= redact_unauthorized_results(search_results.objects(scope, page: params[:page], per_page: per_page, preload_method: preload_method))
end
private
diff --git a/changelogs/unreleased/leaky-constant-fix-29.yml b/changelogs/unreleased/leaky-constant-fix-29.yml
new file mode 100644
index 00000000000..eafa7e599c6
--- /dev/null
+++ b/changelogs/unreleased/leaky-constant-fix-29.yml
@@ -0,0 +1,5 @@
+---
+title: Fix leaky constant issue in sidekiq middleware client metric spec
+merge_request: 32108
+author: Rajendra Kadam
+type: fixed
diff --git a/config/initializers/fill_shards.rb b/config/initializers/fill_shards.rb
index 40a9a271953..90c0d63e4fe 100644
--- a/config/initializers/fill_shards.rb
+++ b/config/initializers/fill_shards.rb
@@ -1,8 +1,7 @@
-# The `table_exists?` check is needed because during our migration rollback testing,
+# The explicit schema version check is needed because during our migration rollback testing,
# `Shard.connected?` could be cached and return true even though the table doesn't exist
return unless Shard.connected?
-return unless Shard.table_exists?
-return unless Shard.connection.index_exists?(:shards, :name, unique: true)
+return unless ActiveRecord::Migrator.current_version >= 20190402150158
return if Gitlab::Database.read_only?
Shard.populate!
diff --git a/doc/.vale/gitlab/Substitutions.yml b/doc/.vale/gitlab/Substitutions.yml
index b9c0dbecf31..1b858645315 100644
--- a/doc/.vale/gitlab/Substitutions.yml
+++ b/doc/.vale/gitlab/Substitutions.yml
@@ -9,6 +9,7 @@ link: https://about.gitlab.com/handbook/communication/#top-misused-terms
level: error
ignorecase: true
swap:
+ frontmatter: front matter
GitLabber: GitLab team member
gitlab omnibus: Omnibus GitLab
param: parameter
diff --git a/doc/development/documentation/index.md b/doc/development/documentation/index.md
index 256d3f5d86c..c88490635d5 100644
--- a/doc/development/documentation/index.md
+++ b/doc/development/documentation/index.md
@@ -550,7 +550,7 @@ You can also
[configure the text editor of your choice](https://errata-ai.github.io/vale/#local-use-by-a-single-writer)
to display the results.
-Vale's test results [are displayed](#testing) in CI pipelines.
+Vale's error-level test results [are displayed](#testing) in CI pipelines.
##### Disable a Vale test
diff --git a/doc/development/documentation/site_architecture/index.md b/doc/development/documentation/site_architecture/index.md
index 56dd3821b1c..169d46ae9ac 100644
--- a/doc/development/documentation/site_architecture/index.md
+++ b/doc/development/documentation/site_architecture/index.md
@@ -173,7 +173,7 @@ we reference the array with a symbol (`:versions`).
## Bumping versions of CSS and JavaScript
Whenever the custom CSS and JavaScript files under `content/assets/` change,
-make sure to bump their version in the frontmatter. This method guarantees that
+make sure to bump their version in the front matter. This method guarantees that
your changes will take effect by clearing the cache of previous files.
Always use Nanoc's way of including those files, do not hardcode them in the
diff --git a/doc/user/project/description_templates.md b/doc/user/project/description_templates.md
index 16ac53a2b52..4090d52b38a 100644
--- a/doc/user/project/description_templates.md
+++ b/doc/user/project/description_templates.md
@@ -29,7 +29,7 @@ templates of the default branch will be taken into account.
For example, if you have a project for tracking new blog posts, you can require the
title, outlines, author name, author social media information, and so on.
- Following the previous example, you can make a template for every MR submitted
- with a new blog post, requiring information about the post date, frontmatter data,
+ with a new blog post, requiring information about the post date, front matter data,
images guidelines, link to the related issue, reviewer name, and so on.
- You can also create issues and merge request templates for different
stages of your workflow, for example, feature proposal, feature improvement, or a bug report.
diff --git a/lib/api/entities/merge_request_basic.rb b/lib/api/entities/merge_request_basic.rb
index 1a89a83a619..1643f267938 100644
--- a/lib/api/entities/merge_request_basic.rb
+++ b/lib/api/entities/merge_request_basic.rb
@@ -6,19 +6,15 @@ module API
expose :merged_by, using: Entities::UserBasic do |merge_request, _options|
merge_request.metrics&.merged_by
end
-
expose :merged_at do |merge_request, _options|
merge_request.metrics&.merged_at
end
-
expose :closed_by, using: Entities::UserBasic do |merge_request, _options|
merge_request.metrics&.latest_closed_by
end
-
expose :closed_at do |merge_request, _options|
merge_request.metrics&.latest_closed_at
end
-
expose :title_html, if: -> (_, options) { options[:render_html] } do |entity|
MarkupHelper.markdown_field(entity, :title)
end
@@ -33,7 +29,6 @@ module API
merge_request.assignee
end
expose :author, :assignees, using: Entities::UserBasic
-
expose :source_project_id, :target_project_id
expose :labels do |merge_request, options|
if options[:with_labels_details]
@@ -85,11 +80,8 @@ module API
end
expose :squash
-
expose :task_completion_status
-
expose :cannot_be_merged?, as: :has_conflicts
-
expose :mergeable_discussions_state?, as: :blocking_discussions_resolved
end
end
diff --git a/lib/api/search.rb b/lib/api/search.rb
index 3d2d4527e30..a9f19a5d781 100644
--- a/lib/api/search.rb
+++ b/lib/api/search.rb
@@ -20,6 +20,10 @@ module API
users: Entities::UserBasic
}.freeze
+ SCOPE_PRELOAD_METHOD = {
+ merge_requests: :with_api_entity_associations
+ }.freeze
+
def search(additional_params = {})
search_params = {
scope: params[:scope],
@@ -29,7 +33,7 @@ module API
per_page: params[:per_page]
}.merge(additional_params)
- results = SearchService.new(current_user, search_params).search_objects
+ results = SearchService.new(current_user, search_params).search_objects(preload_method)
paginate(results)
end
@@ -42,6 +46,10 @@ module API
SCOPE_ENTITY[params[:scope].to_sym]
end
+ def preload_method
+ SCOPE_PRELOAD_METHOD[params[:scope].to_sym]
+ end
+
def verify_search_scope!(resource:)
# In EE we have additional validation requirements for searches.
# Defining this method here as a noop allows us to easily extend it in
diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb
index fbdfe166645..41844a0fb36 100644
--- a/lib/gitlab/project_search_results.rb
+++ b/lib/gitlab/project_search_results.rb
@@ -11,7 +11,7 @@ module Gitlab
@query = query
end
- def objects(scope, page: nil, per_page: DEFAULT_PER_PAGE)
+ def objects(scope, page: nil, per_page: DEFAULT_PER_PAGE, preload_method: nil)
case scope
when 'notes'
notes.page(page).per(per_page)
diff --git a/lib/gitlab/search_results.rb b/lib/gitlab/search_results.rb
index c35ee62163a..6239158ef06 100644
--- a/lib/gitlab/search_results.rb
+++ b/lib/gitlab/search_results.rb
@@ -26,7 +26,7 @@ module Gitlab
@default_project_filter = default_project_filter
end
- def objects(scope, page: nil, per_page: DEFAULT_PER_PAGE, without_count: true)
+ def objects(scope, page: nil, per_page: DEFAULT_PER_PAGE, without_count: true, preload_method: nil)
collection = case scope
when 'projects'
projects
diff --git a/lib/gitlab/snippet_search_results.rb b/lib/gitlab/snippet_search_results.rb
index 9911f9e62a6..1d253ca90f3 100644
--- a/lib/gitlab/snippet_search_results.rb
+++ b/lib/gitlab/snippet_search_results.rb
@@ -11,7 +11,7 @@ module Gitlab
@query = query
end
- def objects(scope, page: nil, per_page: DEFAULT_PER_PAGE)
+ def objects(scope, page: nil, per_page: DEFAULT_PER_PAGE, preload_method: nil)
paginated_objects(snippet_titles, page, per_page)
end
diff --git a/spec/frontend/monitoring/mock_data.js b/spec/frontend/monitoring/mock_data.js
index 4611e6f1b18..4acf2b87ee1 100644
--- a/spec/frontend/monitoring/mock_data.js
+++ b/spec/frontend/monitoring/mock_data.js
@@ -621,6 +621,19 @@ const templatingVariableTypes = {
],
},
},
+ withoutOptText: {
+ label: 'Options without text',
+ type: 'custom',
+ options: {
+ values: [
+ { value: 'value1' },
+ {
+ value: 'value2',
+ default: true,
+ },
+ ],
+ },
+ },
},
},
};
@@ -709,6 +722,26 @@ const responseForAdvancedCustomVariableWithoutLabel = {
},
};
+const responseForAdvancedCustomVariableWithoutOptText = {
+ advCustomWithoutOptText: {
+ label: 'Options without text',
+ value: 'value2',
+ options: [
+ {
+ default: false,
+ text: 'value1',
+ value: 'value1',
+ },
+ {
+ default: true,
+ text: 'value2',
+ value: 'value2',
+ },
+ ],
+ type: 'custom',
+ },
+};
+
const responseForAdvancedCustomVariable = {
...responseForSimpleCustomVariable,
advCustomNormal: {
@@ -752,6 +785,9 @@ export const mockTemplatingData = {
advCustomWithoutLabel: generateMockTemplatingData({
advCustomWithoutLabel: templatingVariableTypes.custom.advanced.withoutLabel,
}),
+ advCustomWithoutOptText: generateMockTemplatingData({
+ advCustomWithoutOptText: templatingVariableTypes.custom.advanced.withoutOptText,
+ }),
simpleAndAdv: generateMockTemplatingData({
simpleCustom: templatingVariableTypes.custom.simple,
advCustomNormal: templatingVariableTypes.custom.advanced.normal,
@@ -773,6 +809,7 @@ export const mockTemplatingDataResponses = {
advCustomWithoutOpts: responseForAdvancedCustomVariableWithoutOptions,
advCustomWithoutType: {},
advCustomWithoutLabel: responseForAdvancedCustomVariableWithoutLabel,
+ advCustomWithoutOptText: responseForAdvancedCustomVariableWithoutOptText,
simpleAndAdv: responseForAdvancedCustomVariable,
allVariableTypes: responsesForAllVariableTypes,
};
diff --git a/spec/frontend/monitoring/store/variable_mapping_spec.js b/spec/frontend/monitoring/store/variable_mapping_spec.js
index 47681ac7c65..c44bb957166 100644
--- a/spec/frontend/monitoring/store/variable_mapping_spec.js
+++ b/spec/frontend/monitoring/store/variable_mapping_spec.js
@@ -3,19 +3,20 @@ import { mockTemplatingData, mockTemplatingDataResponses } from '../mock_data';
describe('parseTemplatingVariables', () => {
it.each`
- case | input | expected
- ${'Returns empty object for no dashboard input'} | ${{}} | ${{}}
- ${'Returns empty object for empty dashboard input'} | ${{ dashboard: {} }} | ${{}}
- ${'Returns empty object for empty templating prop'} | ${mockTemplatingData.emptyTemplatingProp} | ${{}}
- ${'Returns empty object for empty variables prop'} | ${mockTemplatingData.emptyVariablesProp} | ${{}}
- ${'Returns parsed object for simple text variable'} | ${mockTemplatingData.simpleText} | ${mockTemplatingDataResponses.simpleText}
- ${'Returns parsed object for advanced text variable'} | ${mockTemplatingData.advText} | ${mockTemplatingDataResponses.advText}
- ${'Returns parsed object for simple custom variable'} | ${mockTemplatingData.simpleCustom} | ${mockTemplatingDataResponses.simpleCustom}
- ${'Returns parsed object for advanced custom variable without options'} | ${mockTemplatingData.advCustomWithoutOpts} | ${mockTemplatingDataResponses.advCustomWithoutOpts}
- ${'Returns parsed object for advanced custom variable without type'} | ${mockTemplatingData.advCustomWithoutType} | ${{}}
- ${'Returns parsed object for advanced custom variable without label'} | ${mockTemplatingData.advCustomWithoutLabel} | ${mockTemplatingDataResponses.advCustomWithoutLabel}
- ${'Returns parsed object for simple and advanced custom variables'} | ${mockTemplatingData.simpleAndAdv} | ${mockTemplatingDataResponses.simpleAndAdv}
- ${'Returns parsed object for all variable types'} | ${mockTemplatingData.allVariableTypes} | ${mockTemplatingDataResponses.allVariableTypes}
+ case | input | expected
+ ${'Returns empty object for no dashboard input'} | ${{}} | ${{}}
+ ${'Returns empty object for empty dashboard input'} | ${{ dashboard: {} }} | ${{}}
+ ${'Returns empty object for empty templating prop'} | ${mockTemplatingData.emptyTemplatingProp} | ${{}}
+ ${'Returns empty object for empty variables prop'} | ${mockTemplatingData.emptyVariablesProp} | ${{}}
+ ${'Returns parsed object for simple text variable'} | ${mockTemplatingData.simpleText} | ${mockTemplatingDataResponses.simpleText}
+ ${'Returns parsed object for advanced text variable'} | ${mockTemplatingData.advText} | ${mockTemplatingDataResponses.advText}
+ ${'Returns parsed object for simple custom variable'} | ${mockTemplatingData.simpleCustom} | ${mockTemplatingDataResponses.simpleCustom}
+ ${'Returns parsed object for advanced custom variable without options'} | ${mockTemplatingData.advCustomWithoutOpts} | ${mockTemplatingDataResponses.advCustomWithoutOpts}
+ ${'Returns parsed object for advanced custom variable for option without text'} | ${mockTemplatingData.advCustomWithoutOptText} | ${mockTemplatingDataResponses.advCustomWithoutOptText}
+ ${'Returns parsed object for advanced custom variable without type'} | ${mockTemplatingData.advCustomWithoutType} | ${{}}
+ ${'Returns parsed object for advanced custom variable without label'} | ${mockTemplatingData.advCustomWithoutLabel} | ${mockTemplatingDataResponses.advCustomWithoutLabel}
+ ${'Returns parsed object for simple and advanced custom variables'} | ${mockTemplatingData.simpleAndAdv} | ${mockTemplatingDataResponses.simpleAndAdv}
+ ${'Returns parsed object for all variable types'} | ${mockTemplatingData.allVariableTypes} | ${mockTemplatingDataResponses.allVariableTypes}
`('$case', ({ input, expected }) => {
expect(parseTemplatingVariables(input?.dashboard?.templating)).toEqual(expected);
});
diff --git a/spec/lib/gitlab/sidekiq_middleware/client_metrics_spec.rb b/spec/lib/gitlab/sidekiq_middleware/client_metrics_spec.rb
index 5f80ef9538a..1d45b70ec3e 100644
--- a/spec/lib/gitlab/sidekiq_middleware/client_metrics_spec.rb
+++ b/spec/lib/gitlab/sidekiq_middleware/client_metrics_spec.rb
@@ -47,8 +47,11 @@ describe Gitlab::SidekiqMiddleware::ClientMetrics do
end
context "when workers are not attributed" do
- class TestNonAttributedWorker
- include Sidekiq::Worker
+ before do
+ stub_const('TestNonAttributedWorker', Class.new)
+ TestNonAttributedWorker.class_eval do
+ include Sidekiq::Worker
+ end
end
it_behaves_like "a metrics client middleware" do