summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.rubocop.yml1
-rw-r--r--changelogs/unreleased/leaky-constant-fix-34.yml5
-rw-r--r--doc/administration/packages/container_registry.md6
-rw-r--r--doc/administration/packages/dependency_proxy.md6
-rw-r--r--doc/administration/packages/index.md6
-rw-r--r--doc/administration/pages/index.md3
-rw-r--r--doc/administration/pages/source.md6
-rw-r--r--doc/user/application_security/container_scanning/index.md10
-rw-r--r--spec/lib/gitlab/import_export/import_test_coverage_spec.rb100
9 files changed, 88 insertions, 55 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 2944b3555e8..920db8cc91d 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -351,7 +351,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/db/schema_spec.rb'
- 'spec/lib/feature_spec.rb'
- 'spec/lib/gitlab/config/entry/simplifiable_spec.rb'
- - 'spec/lib/gitlab/import_export/import_test_coverage_spec.rb'
- 'spec/lib/gitlab/quick_actions/dsl_spec.rb'
- 'spec/lib/marginalia_spec.rb'
- 'spec/mailers/notify_spec.rb'
diff --git a/changelogs/unreleased/leaky-constant-fix-34.yml b/changelogs/unreleased/leaky-constant-fix-34.yml
new file mode 100644
index 00000000000..822b9ed0471
--- /dev/null
+++ b/changelogs/unreleased/leaky-constant-fix-34.yml
@@ -0,0 +1,5 @@
+---
+title: Fix leaky constant issue in test coverage spec
+merge_request: 32134
+author: Rajendra Kadam
+type: fixed
diff --git a/doc/administration/packages/container_registry.md b/doc/administration/packages/container_registry.md
index 1a8fbf054ac..7c0c9b94e4b 100644
--- a/doc/administration/packages/container_registry.md
+++ b/doc/administration/packages/container_registry.md
@@ -1,3 +1,9 @@
+---
+stage: Package
+group: Package
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
+---
+
# GitLab Container Registry administration
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4040) in GitLab 8.8.
diff --git a/doc/administration/packages/dependency_proxy.md b/doc/administration/packages/dependency_proxy.md
index 99839e15736..565a4521c2a 100644
--- a/doc/administration/packages/dependency_proxy.md
+++ b/doc/administration/packages/dependency_proxy.md
@@ -1,3 +1,9 @@
+---
+stage: Package
+group: Package
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
+---
+
# GitLab Dependency Proxy administration **(PREMIUM ONLY)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7934) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.11.
diff --git a/doc/administration/packages/index.md b/doc/administration/packages/index.md
index 826d7b2847d..8c7b22063dd 100644
--- a/doc/administration/packages/index.md
+++ b/doc/administration/packages/index.md
@@ -1,3 +1,9 @@
+---
+stage: Package
+group: Package
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
+---
+
# GitLab Package Registry administration **(PREMIUM ONLY)**
GitLab Packages allows organizations to utilize GitLab as a private repository
diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md
index 8c642ee96c0..612ead3d26b 100644
--- a/doc/administration/pages/index.md
+++ b/doc/administration/pages/index.md
@@ -1,4 +1,7 @@
---
+stage: Release
+group: Release Management
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
description: 'Learn how to administer GitLab Pages.'
---
diff --git a/doc/administration/pages/source.md b/doc/administration/pages/source.md
index 843ec7a4458..d76f7bdfc85 100644
--- a/doc/administration/pages/source.md
+++ b/doc/administration/pages/source.md
@@ -1,3 +1,9 @@
+---
+stage: Release
+group: Release Management
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
+---
+
# GitLab Pages administration for source installations
>**Note:**
diff --git a/doc/user/application_security/container_scanning/index.md b/doc/user/application_security/container_scanning/index.md
index 21a4155df40..73a43d505f8 100644
--- a/doc/user/application_security/container_scanning/index.md
+++ b/doc/user/application_security/container_scanning/index.md
@@ -103,9 +103,6 @@ Registry, and scans the containers:
variables:
DOCKER_DRIVER: overlay2
-services:
- - docker:19.03.8-dind
-
stages:
- build
- test
@@ -113,6 +110,8 @@ stages:
build:
image: docker:stable
stage: build
+ services:
+ - docker:19.03.8-dind
variables:
IMAGE: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
script:
@@ -274,14 +273,13 @@ this with a pipeline means you won't have to do it manually each time. You can u
```yaml
image: docker:stable
-services:
- - docker:19.03.8-dind
-
stages:
- build
build_latest_vulnerabilities:
stage: build
+ services:
+ - docker:19.03.8-dind
script:
- docker pull arminc/clair-db:latest
- docker tag arminc/clair-db:latest $CI_REGISTRY/namespace/clair-vulnerabilities-db
diff --git a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb
index 038b95809b4..4913984e5dc 100644
--- a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb
+++ b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb
@@ -10,61 +10,65 @@ require 'spec_helper'
describe 'Test coverage of the Project Import' do
include ConfigurationHelper
- # `MUTED_RELATIONS` is a technical debt.
+ # `muted_relations` is a technical debt.
# This list expected to be empty or used as a workround
# in case this spec blocks an important urgent MR.
# It is also expected that adding a relation in the list should lead to
# opening a follow-up issue to fix this.
- MUTED_RELATIONS = %w[
- project.milestones.events.push_event_payload
- project.issues.events
- project.issues.events.push_event_payload
- project.issues.notes.events
- project.issues.notes.events.push_event_payload
- project.issues.milestone.events.push_event_payload
- project.issues.issue_milestones
- project.issues.issue_milestones.milestone
- project.issues.resource_label_events.label.priorities
- project.issues.designs.notes
- project.issues.designs.notes.author
- project.issues.designs.notes.events
- project.issues.designs.notes.events.push_event_payload
- project.merge_requests.metrics
- project.merge_requests.notes.events.push_event_payload
- project.merge_requests.events.push_event_payload
- project.merge_requests.timelogs
- project.merge_requests.label_links
- project.merge_requests.label_links.label
- project.merge_requests.label_links.label.priorities
- project.merge_requests.milestone
- project.merge_requests.milestone.events
- project.merge_requests.milestone.events.push_event_payload
- project.merge_requests.merge_request_milestones
- project.merge_requests.merge_request_milestones.milestone
- project.merge_requests.resource_label_events.label
- project.merge_requests.resource_label_events.label.priorities
- project.ci_pipelines.notes.events
- project.ci_pipelines.notes.events.push_event_payload
- project.protected_branches.unprotect_access_levels
- project.prometheus_metrics
- project.metrics_setting
- project.boards.lists.label.priorities
- project.service_desk_setting
- ].freeze
+ let(:muted_relations) do
+ %w[
+ project.milestones.events.push_event_payload
+ project.issues.events
+ project.issues.events.push_event_payload
+ project.issues.notes.events
+ project.issues.notes.events.push_event_payload
+ project.issues.milestone.events.push_event_payload
+ project.issues.issue_milestones
+ project.issues.issue_milestones.milestone
+ project.issues.resource_label_events.label.priorities
+ project.issues.designs.notes
+ project.issues.designs.notes.author
+ project.issues.designs.notes.events
+ project.issues.designs.notes.events.push_event_payload
+ project.merge_requests.metrics
+ project.merge_requests.notes.events.push_event_payload
+ project.merge_requests.events.push_event_payload
+ project.merge_requests.timelogs
+ project.merge_requests.label_links
+ project.merge_requests.label_links.label
+ project.merge_requests.label_links.label.priorities
+ project.merge_requests.milestone
+ project.merge_requests.milestone.events
+ project.merge_requests.milestone.events.push_event_payload
+ project.merge_requests.merge_request_milestones
+ project.merge_requests.merge_request_milestones.milestone
+ project.merge_requests.resource_label_events.label
+ project.merge_requests.resource_label_events.label.priorities
+ project.ci_pipelines.notes.events
+ project.ci_pipelines.notes.events.push_event_payload
+ project.protected_branches.unprotect_access_levels
+ project.prometheus_metrics
+ project.metrics_setting
+ project.boards.lists.label.priorities
+ project.service_desk_setting
+ ].freeze
+ end
# A list of JSON fixture files we use to test Import.
# Most of the relations are present in `complex/project.json`
# which is our main fixture.
- PROJECT_JSON_FIXTURES = [
- 'spec/fixtures/lib/gitlab/import_export/complex/project.json',
- 'spec/fixtures/lib/gitlab/import_export/group/project.json',
- 'spec/fixtures/lib/gitlab/import_export/light/project.json',
- 'spec/fixtures/lib/gitlab/import_export/milestone-iid/project.json',
- 'spec/fixtures/lib/gitlab/import_export/designs/project.json'
- ].freeze
+ let(:project_json_fixtures) do
+ [
+ 'spec/fixtures/lib/gitlab/import_export/complex/project.json',
+ 'spec/fixtures/lib/gitlab/import_export/group/project.json',
+ 'spec/fixtures/lib/gitlab/import_export/light/project.json',
+ 'spec/fixtures/lib/gitlab/import_export/milestone-iid/project.json',
+ 'spec/fixtures/lib/gitlab/import_export/designs/project.json'
+ ].freeze
+ end
it 'ensures that all imported/exported relations are present in test JSONs' do
- not_tested_relations = (relations_from_config - tested_relations) - MUTED_RELATIONS
+ not_tested_relations = (relations_from_config - tested_relations) - muted_relations
expect(not_tested_relations).to be_empty, failure_message(not_tested_relations)
end
@@ -76,7 +80,7 @@ describe 'Test coverage of the Project Import' do
end
def tested_relations
- PROJECT_JSON_FIXTURES.flat_map(&method(:relations_from_json)).to_set
+ project_json_fixtures.flat_map(&method(:relations_from_json)).to_set
end
def relations_from_json(json_file)
@@ -106,7 +110,7 @@ describe 'Test coverage of the Project Import' do
These relations seem to be added recenty and
they expected to be covered in our Import specs: #{not_tested_relations}.
- To do that, expand one of the files listed in `PROJECT_JSON_FIXTURES`
+ To do that, expand one of the files listed in `project_json_fixtures`
(or expand the list if you consider adding a new fixture file).
After that, add a new spec into
@@ -114,7 +118,7 @@ describe 'Test coverage of the Project Import' do
to check that the relation is being imported correctly.
In case the spec breaks the master or there is a sense of urgency,
- you could include the relations into the `MUTED_RELATIONS` list.
+ you could include the relations into the `muted_relations` list.
Muting relations is considered to be a temporary solution, so please
open a follow-up issue and try to fix that when it is possible.