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:
authorRobert Speicher <robert@gitlab.com>2018-02-13 19:46:37 +0300
committerRobert Speicher <robert@gitlab.com>2018-02-13 19:46:37 +0300
commit480b957e943696b95cae0a7d8b779fe9b2051d8e (patch)
treeff83b9e898c1696c9e18d1eae38d742847fc9fe3
parentb3679f767c16b0529fbec9f8c257f29fd53e6f74 (diff)
parent2bdb578032073f09f41e16c7114f96899aa17927 (diff)
Merge branch 'ce-rc/move-all-ee-specs-to-ee-specs' into 'master'
Port spec/fixtures/api/schemas/deployment.json from EE See merge request gitlab-org/gitlab-ce!17090
-rw-r--r--.rubocop.yml28
-rw-r--r--doc/development/ee_features.md7
-rw-r--r--doc/development/testing_guide/testing_levels.md4
-rw-r--r--spec/fixtures/api/schemas/deployment.json45
-rw-r--r--spec/fixtures/api/schemas/deployments.json44
5 files changed, 79 insertions, 49 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 563a00db6c0..24edb641657 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -10,15 +10,26 @@ AllCops:
Exclude:
- 'vendor/**/*'
- 'node_modules/**/*'
- - 'db/*'
+ - 'db/**/*'
- 'db/fixtures/**/*'
- - 'db/geo/*'
+ - 'ee/db/**/*'
- 'tmp/**/*'
- 'bin/**/*'
- 'generator_templates/**/*'
- 'builds/**/*'
CacheRootDirectory: tmp
+# This cop checks whether some constant value isn't a
+# mutable literal (e.g. array or hash).
+Style/MutableConstant:
+ Enabled: true
+ Exclude:
+ - 'db/migrate/**/*'
+ - 'db/post_migrate/**/*'
+ - 'ee/db/migrate/**/*'
+ - 'ee/db/post_migrate/**/*'
+ - 'ee/db/geo/migrate/**/*'
+
# Gitlab ###################################################################
Gitlab/ModuleWithInstanceVariables:
@@ -33,3 +44,16 @@ Gitlab/ModuleWithInstanceVariables:
# We ignore spec helpers because it usually doesn't matter
- spec/support/**/*.rb
- features/steps/**/*.rb
+
+GitlabSecurity/PublicSend:
+ Enabled: true
+ Exclude:
+ - 'config/**/*'
+ - 'db/**/*'
+ - 'features/**/*'
+ - 'lib/**/*.rake'
+ - 'qa/**/*'
+ - 'spec/**/*'
+ - 'ee/db/**/*'
+ - 'ee/lib/**/*.rake'
+ - 'ee/spec/**/*'
diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md
index f8cee89e650..f6a14de96b2 100644
--- a/doc/development/ee_features.md
+++ b/doc/development/ee_features.md
@@ -28,9 +28,8 @@ we still need to merge changes from GitLab CE to EE. To help us get there,
we should make sure that we no longer edit CE files in place in order to
implement EE features.
-Instead, all EE codes should be put inside the `ee/` top-level directory, and
-tests should be put inside `spec/ee/`. We don't use `ee/spec` for now due to
-technical limitation. The rest of codes should be as close as to the CE files.
+Instead, all EE code should be put inside the `ee/` top-level directory. The
+rest of the code should be as close to the CE files as possible.
[single code base]: https://gitlab.com/gitlab-org/gitlab-ee/issues/2952#note_41016454
@@ -318,7 +317,7 @@ When you're testing EE-only features, avoid adding examples to the
existing CE specs. Also do no change existing CE examples, since they
should remain working as-is when EE is running without a license.
-Instead place EE specs in the `spec/ee/spec` folder.
+Instead place EE specs in the `ee/spec` folder.
## JavaScript code in `assets/javascripts/`
diff --git a/doc/development/testing_guide/testing_levels.md b/doc/development/testing_guide/testing_levels.md
index 4adf0dc7c7a..e86c1f5232a 100644
--- a/doc/development/testing_guide/testing_levels.md
+++ b/doc/development/testing_guide/testing_levels.md
@@ -134,6 +134,10 @@ learn more.
[GitLab QA]: https://gitlab.com/gitlab-org/gitlab-qa
[part of GitLab Rails]: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/qa
+## EE-specific tests
+
+EE-specific tests follows the same organization, but under the `ee/spec` folder.
+
## How to test at the correct level?
As many things in life, deciding what to test at each level of testing is a
diff --git a/spec/fixtures/api/schemas/deployment.json b/spec/fixtures/api/schemas/deployment.json
new file mode 100644
index 00000000000..536e6475c23
--- /dev/null
+++ b/spec/fixtures/api/schemas/deployment.json
@@ -0,0 +1,45 @@
+{
+ "additionalProperties": false,
+ "properties": {
+ "created_at": {
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "iid": {
+ "type": "integer"
+ },
+ "last?": {
+ "type": "boolean"
+ },
+ "ref": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "type": "object"
+ },
+ "sha": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "sha",
+ "created_at",
+ "iid",
+ "tag",
+ "last?",
+ "ref",
+ "id"
+ ],
+ "type": "object"
+}
diff --git a/spec/fixtures/api/schemas/deployments.json b/spec/fixtures/api/schemas/deployments.json
index 1112f23aab2..7bf50e4f859 100644
--- a/spec/fixtures/api/schemas/deployments.json
+++ b/spec/fixtures/api/schemas/deployments.json
@@ -3,49 +3,7 @@
"properties": {
"deployments": {
"items": {
- "additionalProperties": false,
- "properties": {
- "created_at": {
- "type": "string"
- },
- "id": {
- "type": "integer"
- },
- "iid": {
- "type": "integer"
- },
- "last?": {
- "type": "boolean"
- },
- "ref": {
- "additionalProperties": false,
- "properties": {
- "name": {
- "type": "string"
- }
- },
- "required": [
- "name"
- ],
- "type": "object"
- },
- "sha": {
- "type": "string"
- },
- "tag": {
- "type": "boolean"
- }
- },
- "required": [
- "sha",
- "created_at",
- "iid",
- "tag",
- "last?",
- "ref",
- "id"
- ],
- "type": "object"
+ "$ref": "deployment.json"
},
"minItems": 1,
"type": "array"