Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/tooling
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/tooling')
-rw-r--r--spec/tooling/danger/product_intelligence_spec.rb22
-rw-r--r--spec/tooling/danger/project_helper_spec.rb35
-rw-r--r--spec/tooling/graphql/docs/renderer_spec.rb44
3 files changed, 40 insertions, 61 deletions
diff --git a/spec/tooling/danger/product_intelligence_spec.rb b/spec/tooling/danger/product_intelligence_spec.rb
index 17ef67e64fe..4ab911b6590 100644
--- a/spec/tooling/danger/product_intelligence_spec.rb
+++ b/spec/tooling/danger/product_intelligence_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe Tooling::Danger::ProductIntelligence do
subject(:product_intelligence) { fake_danger.new(helper: fake_helper) }
let(:fake_danger) { DangerSpecHelper.fake_danger.include(described_class) }
- let(:changed_files) { ['metrics/counts_7d/test_metric.yml', 'doc/development/usage_ping/dictionary.md'] }
+ let(:changed_files) { ['metrics/counts_7d/test_metric.yml'] }
let(:changed_lines) { ['+tier: ee'] }
before do
@@ -20,22 +20,6 @@ RSpec.describe Tooling::Danger::ProductIntelligence do
allow(fake_helper).to receive(:changed_lines).and_return(changed_lines)
end
- describe '#need_dictionary_changes?' do
- subject { product_intelligence.need_dictionary_changes? }
-
- context 'when changed files do not contain dictionary changes' do
- let(:changed_files) { ['config/metrics/counts_7d/test_metric.yml'] }
-
- it { is_expected.to be true }
- end
-
- context 'when changed files already contains dictionary changes' do
- let(:changed_files) { ['doc/development/usage_ping/dictionary.md'] }
-
- it { is_expected.to be false }
- end
- end
-
describe '#missing_labels' do
subject { product_intelligence.missing_labels }
@@ -109,10 +93,6 @@ RSpec.describe Tooling::Danger::ProductIntelligence do
end
end
- context 'with dictionary file not changed' do
- it { is_expected.to be_empty }
- end
-
context 'with metrics files changed' do
let(:changed_files) { ['config/metrics/counts_7d/test_metric.yml', 'ee/config/metrics/counts_7d/ee_metric.yml'] }
diff --git a/spec/tooling/danger/project_helper_spec.rb b/spec/tooling/danger/project_helper_spec.rb
index 8bcfac5a699..f52c5e02544 100644
--- a/spec/tooling/danger/project_helper_spec.rb
+++ b/spec/tooling/danger/project_helper_spec.rb
@@ -77,7 +77,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do
'ee/spec/frontend/bar' | [:frontend]
'ee/spec/frontend_integration/bar' | [:frontend]
- '.gitlab/ci/frontend.gitlab-ci.yml' | %i[frontend engineering_productivity]
+ '.gitlab/ci/frontend.gitlab-ci.yml' | %i[frontend tooling]
'app/models/foo' | [:backend]
'bin/foo' | [:backend]
@@ -113,22 +113,22 @@ RSpec.describe Tooling::Danger::ProjectHelper do
'Rakefile' | [:backend]
'FOO_VERSION' | [:backend]
- 'Dangerfile' | [:engineering_productivity]
- 'danger/bundle_size/Dangerfile' | [:engineering_productivity]
- 'ee/danger/bundle_size/Dangerfile' | [:engineering_productivity]
- 'danger/bundle_size/' | [:engineering_productivity]
- 'ee/danger/bundle_size/' | [:engineering_productivity]
- '.gitlab-ci.yml' | [:engineering_productivity]
- '.gitlab/ci/cng.gitlab-ci.yml' | [:engineering_productivity]
- '.gitlab/ci/ee-specific-checks.gitlab-ci.yml' | [:engineering_productivity]
- 'scripts/foo' | [:engineering_productivity]
- 'tooling/danger/foo' | [:engineering_productivity]
- 'ee/tooling/danger/foo' | [:engineering_productivity]
- 'lefthook.yml' | [:engineering_productivity]
- '.editorconfig' | [:engineering_productivity]
- 'tooling/bin/find_foss_tests' | [:engineering_productivity]
- '.codeclimate.yml' | [:engineering_productivity]
- '.gitlab/CODEOWNERS' | [:engineering_productivity]
+ 'Dangerfile' | [:tooling]
+ 'danger/bundle_size/Dangerfile' | [:tooling]
+ 'ee/danger/bundle_size/Dangerfile' | [:tooling]
+ 'danger/bundle_size/' | [:tooling]
+ 'ee/danger/bundle_size/' | [:tooling]
+ '.gitlab-ci.yml' | [:tooling]
+ '.gitlab/ci/cng.gitlab-ci.yml' | [:tooling]
+ '.gitlab/ci/ee-specific-checks.gitlab-ci.yml' | [:tooling]
+ 'scripts/foo' | [:tooling]
+ 'tooling/danger/foo' | [:tooling]
+ 'ee/tooling/danger/foo' | [:tooling]
+ 'lefthook.yml' | [:tooling]
+ '.editorconfig' | [:tooling]
+ 'tooling/bin/find_foss_tests' | [:tooling]
+ '.codeclimate.yml' | [:tooling]
+ '.gitlab/CODEOWNERS' | [:tooling]
'lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml' | [:ci_template]
'lib/gitlab/ci/templates/dotNET-Core.yml' | [:ci_template]
@@ -177,7 +177,6 @@ RSpec.describe Tooling::Danger::ProjectHelper do
'ee/config/metrics/counts_7d/20210216174919_g_analytics_issues_weekly.yml' | [:product_intelligence]
'lib/gitlab/usage_data_counters/aggregated_metrics/common.yml' | [:product_intelligence]
'lib/gitlab/usage_data_counters/hll_redis_counter.rb' | [:backend, :product_intelligence]
- 'doc/development/usage_ping/dictionary.md' | [:docs, :product_intelligence]
'lib/gitlab/tracking.rb' | [:backend, :product_intelligence]
'spec/lib/gitlab/tracking_spec.rb' | [:backend, :product_intelligence]
'app/helpers/tracking_helper.rb' | [:backend, :product_intelligence]
diff --git a/spec/tooling/graphql/docs/renderer_spec.rb b/spec/tooling/graphql/docs/renderer_spec.rb
index 50ebb754ca4..de5ec928921 100644
--- a/spec/tooling/graphql/docs/renderer_spec.rb
+++ b/spec/tooling/graphql/docs/renderer_spec.rb
@@ -14,13 +14,13 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
let(:template) { Rails.root.join('tooling/graphql/docs/templates/default.md.haml') }
let(:field_description) { 'List of objects.' }
- let(:type) { ::GraphQL::INT_TYPE }
+ let(:type) { ::GraphQL::Types::Int }
let(:query_type) do
Class.new(Types::BaseObject) { graphql_name 'Query' }.tap do |t|
# this keeps type and field_description in scope.
t.field :foo, type, null: true, description: field_description do
- argument :id, GraphQL::ID_TYPE, required: false, description: 'ID of the object.'
+ argument :id, GraphQL::Types::ID, required: false, description: 'ID of the object.'
end
end
end
@@ -73,7 +73,7 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
Class.new(Types::BaseObject) do
graphql_name 'ArrayTest'
- field :foo, [GraphQL::STRING_TYPE], null: false, description: 'A description.'
+ field :foo, [GraphQL::Types::String], null: false, description: 'A description.'
end
end
@@ -129,8 +129,8 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
Class.new(Types::BaseObject) do
graphql_name 'OrderingTest'
- field :foo, GraphQL::STRING_TYPE, null: false, description: 'A description of foo field.'
- field :bar, GraphQL::STRING_TYPE, null: false, description: 'A description of bar field.'
+ field :foo, GraphQL::Types::String, null: false, description: 'A description of foo field.'
+ field :bar, GraphQL::Types::String, null: false, description: 'A description of bar field.'
end
end
@@ -154,7 +154,7 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
let(:type) do
wibble = Class.new(::Types::BaseObject) do
graphql_name 'Wibble'
- field :x, ::GraphQL::INT_TYPE, null: false
+ field :x, ::GraphQL::Types::Int, null: false
end
Class.new(Types::BaseObject) do
@@ -162,16 +162,16 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
description 'Testing doc refs'
field :foo,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
description: 'The foo.',
see: { 'A list of foos' => 'https://example.com/foos' }
field :bar,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
description: 'The bar.',
see: { 'A list of bars' => 'https://example.com/bars' } do
- argument :barity, ::GraphQL::INT_TYPE, required: false, description: '?'
+ argument :barity, ::GraphQL::Types::Int, required: false, description: '?'
end
field :wibbles,
type: wibble.connection_type,
@@ -220,10 +220,10 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
description 'A thing we used to use, but no longer support'
field :foo,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
description: 'A description.' do
- argument :foo_arg, GraphQL::STRING_TYPE,
+ argument :foo_arg, GraphQL::Types::String,
required: false,
description: 'The argument.',
deprecated: { reason: 'Bad argument', milestone: '101.2' }
@@ -257,19 +257,19 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
description 'A thing we used to use, but no longer support'
field :foo,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
deprecated: { reason: 'This is deprecated', milestone: '1.10' },
description: 'A description.'
field :foo_with_args,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
deprecated: { reason: 'Do not use', milestone: '1.10', replacement: 'X.y' },
description: 'A description.' do
- argument :arg, GraphQL::INT_TYPE, required: false, description: 'Argity'
+ argument :arg, GraphQL::Types::Int, required: false, description: 'Argity'
end
field :bar,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
description: 'A description.',
deprecated: {
@@ -328,7 +328,7 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
)
end
- let(:type) { ::GraphQL::INT_TYPE }
+ let(:type) { ::GraphQL::Types::Int }
let(:section) do
<<~DOC
### `Query.bar`
@@ -453,12 +453,12 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
}
mutation.field :everything,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: true,
description: 'What we made prettier.'
mutation.field :omnis,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: true,
description: 'What we made prettier.',
deprecated: {
@@ -516,7 +516,7 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
let(:type) do
Class.new(::Types::BaseObject) do
graphql_name 'Foo'
- field :wibble, type: ::GraphQL::INT_TYPE, null: true do
+ field :wibble, type: ::GraphQL::Types::Int, null: true do
argument :date_range,
type: ::Types::TimeframeInputType,
required: true,
@@ -547,10 +547,10 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
let(:type) do
user = Class.new(::Types::BaseObject)
user.graphql_name 'User'
- user.field :user_field, ::GraphQL::STRING_TYPE, null: true
+ user.field :user_field, ::GraphQL::Types::String, null: true
group = Class.new(::Types::BaseObject)
group.graphql_name 'Group'
- group.field :group_field, ::GraphQL::STRING_TYPE, null: true
+ group.field :group_field, ::GraphQL::Types::String, null: true
union = Class.new(::Types::BaseUnion)
union.graphql_name 'UserOrGroup'
@@ -561,7 +561,7 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
interface.include(::Types::BaseInterface)
interface.graphql_name 'Flying'
interface.description 'Something that can fly.'
- interface.field :flight_speed, GraphQL::INT_TYPE, null: true, description: 'Speed in mph.'
+ interface.field :flight_speed, GraphQL::Types::Int, null: true, description: 'Speed in mph.'
african_swallow = Class.new(::Types::BaseObject)
african_swallow.graphql_name 'AfricanSwallow'