diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 86cb215a541ed1f1acbab6debb0121642e05887e..d6a90ac12d2aa538f0c36a5f69543762a976a450 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,8 +19,10 @@ variables:
   EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH: knapsack/${CI_PROJECT_NAME}/rspec_report-master-ee.json
 
 before_script:
+  - bundle --version
   - date
   - source scripts/utils.sh
+  - date
   - source scripts/prepare_build.sh
   - date
 
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index 62f2fb4eab963d701569bb8f1a4fb5d494ee18db..7ddc986b01cfd82231917375c289ee733bfb5364 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -6,13 +6,13 @@
 
 .use-pg-10: &use-pg-10
   services:
-    - name: postgres:10.7
+    - name: postgres:10.0
       command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
     - name: redis:alpine
 
 .use-mysql: &use-mysql
   services:
-    - mysql:5.7
+    - mysql:5.7.24
     - redis:alpine
 
 .only-schedules-master: &only-schedules-master
@@ -53,10 +53,8 @@
   script:
     - JOB_NAME=( $CI_JOB_NAME )
     - TEST_TOOL=${JOB_NAME[0]}
-    - TEST_LEVEL=${JOB_NAME[1]}
-    - DATABASE=${JOB_NAME[2]}
-    - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
-    - export KNAPSACK_GENERATE_REPORT=true KNAPSACK_LOG_LEVEL=debug KNAPSACK_TEST_DIR=spec
+    - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
+    - export KNAPSACK_GENERATE_REPORT=true
     - export SUITE_FLAKY_RSPEC_REPORT_PATH=${FLAKY_RSPEC_SUITE_REPORT_PATH}
     - export FLAKY_RSPEC_REPORT_PATH=rspec_flaky/all_${TEST_TOOL}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
     - export NEW_FLAKY_RSPEC_REPORT_PATH=rspec_flaky/new_${TEST_TOOL}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
@@ -66,10 +64,7 @@
     - '[[ -f $FLAKY_RSPEC_REPORT_PATH ]] || echo "{}" > ${FLAKY_RSPEC_REPORT_PATH}'
     - '[[ -f $NEW_FLAKY_RSPEC_REPORT_PATH ]] || echo "{}" > ${NEW_FLAKY_RSPEC_REPORT_PATH}'
     - scripts/gitaly-test-spawn
-    - date
-    - 'export KNAPSACK_TEST_FILE_PATTERN=$(ruby -r./lib/quality/test_level.rb -e "puts Quality::TestLevel.new.pattern(:${TEST_LEVEL})")'
-    - knapsack rspec "--color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag level:${TEST_LEVEL} --tag ~geo"
-    - date
+    - knapsack rspec "--color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag ~geo"
   artifacts:
     expire_in: 31d
     when: always
@@ -146,47 +141,19 @@ setup-test-env:
   except:
     - /(^docs[\/-].*|.*-docs$)/
 
-rspec unit pg:
-  <<: *rspec-metadata-pg
-  parallel: 20
-
-rspec integration pg:
-  <<: *rspec-metadata-pg
-  parallel: 6
-
-rspec system pg:
+rspec-pg:
   <<: *rspec-metadata-pg
-  parallel: 24
-
-rspec unit pg-10:
-  <<: *rspec-metadata-pg-10
-  <<: *only-schedules-master
-  parallel: 20
-
-rspec integration pg-10:
-  <<: *rspec-metadata-pg-10
-  <<: *only-schedules-master
-  parallel: 6
+  parallel: 50
 
-rspec system pg-10:
+rspec-pg-10:
   <<: *rspec-metadata-pg-10
   <<: *only-schedules-master
-  parallel: 24
+  parallel: 50
 
-rspec unit mysql:
+rspec-mysql:
   <<: *rspec-metadata-mysql
   <<: *only-schedules-master
-  parallel: 20
-
-rspec integration mysql:
-  <<: *rspec-metadata-mysql
-  <<: *only-schedules-master
-  parallel: 6
-
-rspec system mysql:
-  <<: *rspec-metadata-mysql
-  <<: *only-schedules-master
-  parallel: 24
+  parallel: 50
 
 rspec-fast-spec-helper:
   <<: *rspec-metadata-pg
@@ -198,7 +165,7 @@ rspec-fast-spec-helper:
   script:
     - export CACHE_CLASSES=true
     - scripts/gitaly-test-spawn
-    - bin/rspec --color --format documentation --tag quarantine -- spec/
+    - bin/rspec --color --format documentation --tag quarantine spec/
 
 rspec-pg-quarantine:
   <<: *rspec-metadata-pg
@@ -327,12 +294,22 @@ coverage:
     - /(^qa[\/-].*|.*-qa$)/
 
 ## EE-specific content
+
+.use-pg-9-6: &use-pg-9-6
+  services:
+    - postgres:9.6
+    - redis:alpine
+
+.use-pg-10-2: &use-pg-10-2
+  services:
+    - postgres:10.2
+    - redis:alpine
+
 .use-pg-with-elasticsearch: &use-pg-with-elasticsearch
   services:
-    - name: postgres:9.6
-      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
-    - name: redis:alpine
-    - name: docker.elastic.co/elasticsearch/elasticsearch:5.6.12
+    - postgres:9.6
+    - redis:alpine
+    - docker.elastic.co/elasticsearch/elasticsearch:5.6.12
 
 .use-mysql-with-elasticsearch: &use-mysql-with-elasticsearch
   services:
@@ -346,54 +323,21 @@ coverage:
   script:
     - JOB_NAME=( $CI_JOB_NAME )
     - TEST_TOOL=${JOB_NAME[0]}
-    - TEST_LEVEL=${JOB_NAME[1]}
-    - DATABASE=${JOB_NAME[2]}
-    - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_ee_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
-    - export KNAPSACK_GENERATE_REPORT=true KNAPSACK_LOG_LEVEL=debug KNAPSACK_TEST_DIR=spec
-    - export CACHE_CLASSES=true
+    - export KNAPSACK_TEST_FILE_PATTERN="ee/spec/**{,/*/**}/*_spec.rb" KNAPSACK_GENERATE_REPORT=true CACHE_CLASSES=true
+    - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
     - cp ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} ${KNAPSACK_REPORT_PATH}
     - scripts/gitaly-test-spawn
-    - date
-    - 'export KNAPSACK_TEST_FILE_PATTERN=$(ruby -r./lib/quality/test_level.rb -e "puts Quality::TestLevel.new(%(ee/)).pattern(:${TEST_LEVEL})")'
-    - knapsack rspec "--color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag level:${TEST_LEVEL} --tag ~geo"
-    - date
+    - knapsack rspec "-Ispec --color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag ~geo"
 
-.rspec-metadata-pg-ee: &rspec-metadata-pg-ee
+.rspec-ee-pg: &rspec-ee-pg
   <<: *rspec-metadata-ee
   <<: *use-pg-with-elasticsearch
 
-.rspec-metadata-mysql-ee: &rspec-metadata-mysql-ee
+.rspec-ee-mysql: &rspec-ee-mysql
   <<: *rspec-metadata-ee
   <<: *use-mysql-with-elasticsearch
 
-rspec unit pg ee:
-  <<: *rspec-metadata-pg-ee
-  parallel: 7
-
-rspec integration pg ee:
-  <<: *rspec-metadata-pg-ee
-  parallel: 3
-
-rspec system pg ee:
-  <<: *rspec-metadata-pg-ee
-  parallel: 5
-
-rspec unit mysql ee:
-  <<: *rspec-metadata-mysql-ee
-  <<: *only-schedules-master
-  parallel: 7
-
-rspec integration mysql ee:
-  <<: *rspec-metadata-mysql-ee
-  <<: *only-schedules-master
-  parallel: 3
-
-rspec system mysql ee:
-  <<: *rspec-metadata-mysql-ee
-  <<: *only-schedules-master
-  parallel: 5
-
-.rspec-metadata-pg-geo: &rspec-metadata-pg-geo
+.rspec-geo: &rspec-metadata-geo
   <<: *rspec-metadata
   stage: test
   script:
@@ -406,9 +350,45 @@ rspec system mysql ee:
     - scripts/gitaly-test-spawn
     - knapsack rspec "-Ispec --color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag geo"
 
+.rspec-geo-pg-9-6: &rspec-metadata-pg-geo-9-6
+  <<: *rspec-metadata-geo
+  <<: *use-pg-9-6
+
+.rspec-geo-pg-10-2: &rspec-metadata-pg-geo-10-2
+  <<: *rspec-metadata-geo
+  <<: *use-pg-10-2
+
+.migration-paths-upgrade-ce-to-ee: &migration-paths-upgrade-ce-to-ee
+  extends: .dedicated-no-docs-and-no-qa-pull-cache-job
+  variables:
+    SETUP_DB: "false"
+  script:
+    - ruby -r./scripts/ee_specific_check/ee_specific_check -e'EESpecificCheck.fetch_remote_ce_branch'
+    - git checkout -f FETCH_HEAD
+    - . scripts/utils.sh
+    - . scripts/prepare_build.sh
+    - date
+    - setup_db
+    - date
+    - git checkout -f $CI_COMMIT_SHA
+    - date
+    - . scripts/prepare_build.sh
+    - date
+    - bundle exec rake db:migrate
+  dependencies:
+    - setup-test-env
+
+rspec-pg-ee:
+  <<: *rspec-ee-pg
+  parallel: 10
+
+rspec-mysql-ee:
+  <<: *rspec-ee-mysql
+  <<: *only-schedules-master
+  parallel: 10
+
 rspec-pg-ee geo:
-  <<: *rspec-metadata-pg-geo
-  <<: *use-pg
+  <<: *rspec-metadata-pg-geo-9-6
   parallel: 3
   except:
     - /(^geo[\/-].*|.*-geo$)/
@@ -416,8 +396,7 @@ rspec-pg-ee geo:
     - /(^qa[\/-].*|.*-qa$)/
 
 rspec-pg-10-ee geo:
-  <<: *rspec-metadata-pg-geo
-  <<: *use-pg-10
+  <<: *rspec-metadata-pg-geo-10-2
   parallel: 3
   except:
     - /(^geo[\/-].*|.*-geo$)/
@@ -425,54 +404,33 @@ rspec-pg-10-ee geo:
     - /(^qa[\/-].*|.*-qa$)/
 
 quick-rspec-pg-ee geo:
-  <<: *rspec-metadata-pg-geo
-  <<: *use-pg
+  <<: *rspec-metadata-pg-geo-9-6
   stage: quick-test
   only:
     - /(^geo[\/-].*|.*-geo$)/
 
 quick-rspec-pg-10-ee geo:
-  <<: *rspec-metadata-pg-geo
-  <<: *use-pg-10
+  <<: *rspec-metadata-pg-geo-10-2
   stage: quick-test
   only:
     - /(^geo[\/-].*|.*-geo$)/
 
 .rspec-quarantine-ee: &rspec-quarantine-ee
   <<: *only-schedules-master
-  allow_failure: true
   script:
-    - export NO_KNAPSACK=1 CACHE_CLASSES=true
+    - export CACHE_CLASSES=true
     - scripts/gitaly-test-spawn
-    - bin/rspec --color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag quarantine -- ee/spec/
+    - bin/rspec --color --format documentation --tag quarantine ee/spec/
 
-rspec quarantine pg ee:
-  <<: *rspec-quarantine-ee
+rspec-pg-quarantine-ee:
   <<: *rspec-metadata-pg
-
-rspec quarantine mysql ee:
   <<: *rspec-quarantine-ee
-  <<: *rspec-metadata-mysql
+  allow_failure: true
 
-.migration-paths-upgrade-ce-to-ee: &migration-paths-upgrade-ce-to-ee
-  extends: .dedicated-no-docs-and-no-qa-pull-cache-job
-  variables:
-    SETUP_DB: "false"
-  script:
-    - ruby -r./scripts/ee_specific_check/ee_specific_check -e'EESpecificCheck.fetch_remote_ce_branch'
-    - git checkout -f FETCH_HEAD
-    - . scripts/utils.sh
-    - . scripts/prepare_build.sh
-    - date
-    - setup_db
-    - date
-    - git checkout -f $CI_COMMIT_SHA
-    - date
-    - . scripts/prepare_build.sh
-    - date
-    - bundle exec rake db:migrate
-  dependencies:
-    - setup-test-env
+rspec-mysql-quarantine-ee:
+  <<: *rspec-metadata-mysql
+  <<: *rspec-quarantine-ee
+  allow_failure: true
 
 migration:upgrade-pg-ce-to-ee:
   <<: *migration-paths-upgrade-ce-to-ee
diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml
index bb6167ddfc8ca13303bc50e4bb47e5c05dd8eb6e..1d45afec9f71b648c281e42415042abe560ca22b 100644
--- a/.gitlab/ci/test-metadata.gitlab-ci.yml
+++ b/.gitlab/ci/test-metadata.gitlab-ci.yml
@@ -42,14 +42,14 @@ update-tests-metadata:
     policy: push
   script:
     - retry gem install fog-aws mime-types activesupport rspec_profiling postgres-copy --no-document
-    - scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec_*_pg_node_*.json
-    - '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $KNAPSACK_RSPEC_SUITE_REPORT_PATH'
-    - scripts/merge-reports ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec_*_pg_ee_*node_*.json
-    - '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH'
-    - rm -f knapsack/${CI_PROJECT_NAME}/*_node_*.json
+    - scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg_node_*.json
+    - scripts/merge-reports ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg-ee_*node_*.json
     - scripts/merge-reports ${FLAKY_RSPEC_SUITE_REPORT_PATH} rspec_flaky/all_*_*.json
     - FLAKY_RSPEC_GENERATE_REPORT=1 scripts/prune-old-flaky-specs ${FLAKY_RSPEC_SUITE_REPORT_PATH}
+    - '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $KNAPSACK_RSPEC_SUITE_REPORT_PATH'
+    - '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH'
     - '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $FLAKY_RSPEC_SUITE_REPORT_PATH'
+    - rm -f knapsack/${CI_PROJECT_NAME}/*_node_*.json
     - rm -f rspec_flaky/all_*.json rspec_flaky/new_*.json
     - scripts/insert-rspec-profiling-data
   only:
diff --git a/Gemfile b/Gemfile
index 5ec1c988a34a12f054b9ec1e847b6be66cf8fc08..d7c1c3576f08d4dbe174b83540956ab1190a19db 100644
--- a/Gemfile
+++ b/Gemfile
@@ -376,7 +376,7 @@ group :development, :test do
 
   gem 'scss_lint', '~> 0.56.0', require: false
   gem 'haml_lint', '~> 0.31.0', require: false
-  gem 'simplecov', '~> 0.16.1', require: false
+  gem 'simplecov', '~> 0.14.0', require: false
   gem 'bundler-audit', '~> 0.5.0', require: false
 
   gem 'benchmark-ips', '~> 2.3.0', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 19fd9c26953a5608e7659acf8b58a4b74c12ffbb..9d36470028a3c1622b85548e1694f6234f5e6d8a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -183,7 +183,7 @@ GEM
     diffy (3.1.0)
     discordrb-webhooks-blackst0ne (3.3.0)
       rest-client (~> 2.0)
-    docile (1.3.1)
+    docile (1.1.5)
     domain_name (0.5.20180417)
       unf (>= 0.0.5, < 1.0.0)
     doorkeeper (4.3.2)
@@ -904,11 +904,11 @@ GEM
       jwt (>= 1.5, < 3.0)
       multi_json (~> 1.10)
     simple_po_parser (1.1.2)
-    simplecov (0.16.1)
-      docile (~> 1.1)
+    simplecov (0.14.1)
+      docile (~> 1.1.0)
       json (>= 1.8, < 3)
       simplecov-html (~> 0.10.0)
-    simplecov-html (0.10.2)
+    simplecov-html (0.10.0)
     slack-notifier (1.5.1)
     snowplow-tracker (0.6.1)
       contracts (~> 0.7, <= 0.11)
@@ -1245,7 +1245,7 @@ DEPENDENCIES
   sidekiq (~> 5.2.7)
   sidekiq-cron (~> 1.0)
   simple_po_parser (~> 1.1.2)
-  simplecov (~> 0.16.1)
+  simplecov (~> 0.14.0)
   slack-notifier (~> 1.5.1)
   snowplow-tracker (~> 0.6.1)
   spring (~> 2.0.0)
diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md
index f06ffab03c6dfa732a26fa6fb6e464ce1d308c25..27fc3231218bb06ad8d5ffcafdca6a7fa340f10d 100644
--- a/doc/development/rake_tasks.md
+++ b/doc/development/rake_tasks.md
@@ -108,13 +108,11 @@ To make sure that indices still fit. You could find great details in:
 
 In order to run the test you can use the following commands:
 
-- `bin/rake spec` to run the rspec suite
-- `bin/rake spec:unit` to run the only the unit tests
-- `bin/rake spec:integration` to run the only the integration tests
-- `bin/rake spec:system` to run the only the system tests
-- `bin/rake karma` to run the karma test suite
+- `rake spec` to run the rspec suite
+- `rake karma` to run the karma test suite
+- `rake gitlab:test` to run all the tests
 
-Note: `bin/rake spec` takes significant time to pass.
+Note: `rake spec` takes significant time to pass.
 Instead of running full test suite locally you can save a lot of time by running
 a single test or directory related to your changes. After you submit merge request
 CI will run full test suite for you. Green CI status in the merge request means
@@ -123,9 +121,6 @@ full test suite is passed.
 Note: You can't run `rspec .` since this will try to run all the `_spec.rb`
 files it can find, also the ones in `/tmp`
 
-Note: You can pass RSpec command line options to the `spec:unit`,
-`spec:integration`, and `spec:system` tasks, e.g. `bin/rake "spec:unit[--tag ~geo --dry-run]"`.
-
 To run a single test file you can use:
 
 - `bin/rspec spec/controllers/commit_controller_spec.rb` for a rspec test
diff --git a/doc/development/testing_guide/testing_levels.md b/doc/development/testing_guide/testing_levels.md
index b5155b6b7fa3ec7c614d735404f59dfcc1f43012..1fa6e38ea5a0c1627d79ad29622744e68c044fc1 100644
--- a/doc/development/testing_guide/testing_levels.md
+++ b/doc/development/testing_guide/testing_levels.md
@@ -4,14 +4,12 @@
 
 _This diagram demonstrates the relative priority of each test type we use. `e2e` stands for end-to-end._
 
-As of 2019-05-01, we have the following distribution of tests per level:
+As of 2019-04-16, we have the following distribution of tests per level:
 
-| Test level | Community Edition | Enterprise Edition  | Community + Enterprise Edition |
-| --------- | ---------- | -------------- | ----- |
-| Black-box tests at the system level (aka end-to-end or QA tests) | 68 (0.14%) | 31 (0.2%) | 99 (0.17%) |
-| White-box tests at the system level (aka system or feature tests) | 5,471 (11.9%) | 969 (7.4%) | 6440 (10.9%) |
-| Integration tests | 8,333 (18.2%) | 2,244 (17.2%) | 10,577 (17.9%) |
-| Unit tests | 32,031 (69.7%) | 9,778 (75.1%) | 41,809 (71%) |
+- 67 black-box tests at the system level (aka end-to-end or QA tests) in CE, 98 in EE. This represents 0.3% of all the CE tests (0.3% in EE).
+- 5,457 white-box tests at the system level (aka system or feature tests) in CE, 6,585 in EE. This represents 24.6% of all the CE tests (20.3% in EE).
+- 8,298 integration tests in CE, 10,633 in EE: 0.3% of all the CE tests (0.3% in EE). This represents 37.2% of all the CE tests (32.8% in EE).
+- 8,403 unit tests in CE, 15,090 in EE: 0.3% of all the CE tests (0.3% in EE). This represents 37.8% of all the CE tests (46.6% in EE).
 
 ## Unit tests
 
diff --git a/ee/spec/services/ci/create_web_ide_terminal_service_spec.rb b/ee/spec/app/services/ci/create_web_ide_terminal_service_spec.rb
similarity index 100%
rename from ee/spec/services/ci/create_web_ide_terminal_service_spec.rb
rename to ee/spec/app/services/ci/create_web_ide_terminal_service_spec.rb
diff --git a/ee/spec/services/ci/web_ide_config_service_spec.rb b/ee/spec/app/services/ci/web_ide_config_service_spec.rb
similarity index 100%
rename from ee/spec/services/ci/web_ide_config_service_spec.rb
rename to ee/spec/app/services/ci/web_ide_config_service_spec.rb
diff --git a/ee/spec/support/protected_tags/access_control_shared_examples.rb b/ee/spec/support/protected_tags/access_control_spec.rb
similarity index 100%
rename from ee/spec/support/protected_tags/access_control_shared_examples.rb
rename to ee/spec/support/protected_tags/access_control_spec.rb
diff --git a/lib/quality/test_level.rb b/lib/quality/test_level.rb
deleted file mode 100644
index 24d8eac200c299091dfc579b8775ed74ebcca36d..0000000000000000000000000000000000000000
--- a/lib/quality/test_level.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-# frozen_string_literal: true
-
-module Quality
-  class TestLevel
-    UnknownTestLevelError = Class.new(StandardError)
-
-    TEST_LEVEL_FOLDERS = {
-      unit: %w[
-        bin
-        config
-        db
-        dependencies
-        factories
-        finders
-        frontend
-        graphql
-        helpers
-        initializers
-        javascripts
-        lib
-        migrations
-        models
-        policies
-        presenters
-        rack_servers
-        routing
-        rubocop
-        serializers
-        services
-        sidekiq
-        tasks
-        uploaders
-        validators
-        views
-        workers
-        elastic_integration
-      ],
-      integration: %w[
-        controllers
-        mailers
-        requests
-      ],
-      system: ['features']
-    }.freeze
-
-    attr_reader :prefix
-
-    def initialize(prefix = nil)
-      @prefix = prefix
-      @patterns = {}
-      @regexps = {}
-    end
-
-    def pattern(level)
-      @patterns[level] ||= "#{prefix}spec/{#{TEST_LEVEL_FOLDERS.fetch(level).join(',')}}{,/**/}*_spec.rb".freeze
-    end
-
-    def regexp(level)
-      @regexps[level] ||= Regexp.new("#{prefix}spec/(#{TEST_LEVEL_FOLDERS.fetch(level).join('|')})").freeze
-    end
-
-    def level_for(file_path)
-      case file_path
-      when regexp(:unit)
-        :unit
-      when regexp(:integration)
-        :integration
-      when regexp(:system)
-        :system
-      else
-        raise UnknownTestLevelError, "Test level for #{file_path} couldn't be set. Please rename the file properly or change the test level detection regexes in #{__FILE__}."
-      end
-    end
-  end
-end
diff --git a/lib/tasks/spec.rake b/lib/tasks/spec.rake
index c881ad4cf12cd2be86704f3cea1d54bffb05333e..2eddcb3c777bd44bc2840ada27dff51c3d90a48c 100644
--- a/lib/tasks/spec.rake
+++ b/lib/tasks/spec.rake
@@ -1,32 +1,7 @@
-# frozen_string_literal: true
-
-return if Rails.env.production?
-
 Rake::Task["spec"].clear if Rake::Task.task_defined?('spec')
 
 namespace :spec do
-  desc 'GitLab | RSpec | Run unit tests'
-  RSpec::Core::RakeTask.new(:unit, :rspec_opts) do |t, args|
-    require_dependency 'quality/test_level'
-    t.pattern = Quality::TestLevel.new.pattern(:unit)
-    t.rspec_opts = args[:rspec_opts]
-  end
-
-  desc 'GitLab | RSpec | Run integration tests'
-  RSpec::Core::RakeTask.new(:integration, :rspec_opts) do |t, args|
-    require_dependency 'quality/test_level'
-    t.pattern = Quality::TestLevel.new.pattern(:integration)
-    t.rspec_opts = args[:rspec_opts]
-  end
-
-  desc 'GitLab | RSpec | Run system tests'
-  RSpec::Core::RakeTask.new(:system, :rspec_opts) do |t, args|
-    require_dependency 'quality/test_level'
-    t.pattern = Quality::TestLevel.new.pattern(:system)
-    t.rspec_opts = args[:rspec_opts]
-  end
-
-  desc '[Deprecated] Use the "bin/rspec --tag api" instead'
+  desc 'GitLab | Rspec | Run request specs'
   task :api do
     cmds = [
       %w(rake gitlab:setup),
@@ -35,7 +10,7 @@ namespace :spec do
     run_commands(cmds)
   end
 
-  desc '[Deprecated] Use the "spec:system" task instead'
+  desc 'GitLab | Rspec | Run feature specs'
   task :feature do
     cmds = [
       %w(rake gitlab:setup),
@@ -44,7 +19,7 @@ namespace :spec do
     run_commands(cmds)
   end
 
-  desc '[Deprecated] Use "bin/rspec spec/models" instead'
+  desc 'GitLab | Rspec | Run model specs'
   task :models do
     cmds = [
       %w(rake gitlab:setup),
@@ -53,7 +28,7 @@ namespace :spec do
     run_commands(cmds)
   end
 
-  desc '[Deprecated] Use "bin/rspec spec/services" instead'
+  desc 'GitLab | Rspec | Run service specs'
   task :services do
     cmds = [
       %w(rake gitlab:setup),
@@ -62,7 +37,7 @@ namespace :spec do
     run_commands(cmds)
   end
 
-  desc '[Deprecated] Use "bin/rspec spec/lib" instead'
+  desc 'GitLab | Rspec | Run lib specs'
   task :lib do
     cmds = [
       %w(rake gitlab:setup),
@@ -70,6 +45,15 @@ namespace :spec do
     ]
     run_commands(cmds)
   end
+
+  desc 'GitLab | Rspec | Run other specs'
+  task :other do
+    cmds = [
+      %w(rake gitlab:setup),
+      %w(rspec spec --tag ~@api --tag ~@feature --tag ~@models --tag ~@lib --tag ~@services)
+    ]
+    run_commands(cmds)
+  end
 end
 
 desc "GitLab | Run specs"
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index 5fca95f1f4001eee75689416f340332501748ecb..58b74f2f07d92004251c0c8804bf94a7aac08ef7 100644
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -5,7 +5,6 @@ export USE_BUNDLE_INSTALL=${USE_BUNDLE_INSTALL:-true}
 export BUNDLE_INSTALL_FLAGS="--without=production --jobs=$(nproc) --path=vendor --retry=3 --quiet"
 
 if [ "$USE_BUNDLE_INSTALL" != "false" ]; then
-  bundle --version
   bundle install --clean $BUNDLE_INSTALL_FLAGS && bundle check
 fi
 
diff --git a/spec/lib/quality/test_level_spec.rb b/spec/lib/quality/test_level_spec.rb
deleted file mode 100644
index 3465c3a050b668279ae1ac27c896303d9a414e21..0000000000000000000000000000000000000000
--- a/spec/lib/quality/test_level_spec.rb
+++ /dev/null
@@ -1,105 +0,0 @@
-# frozen_string_literal: true
-
-require 'fast_spec_helper'
-
-RSpec.describe Quality::TestLevel do
-  describe '#pattern' do
-    context 'when level is unit' do
-      it 'returns a pattern' do
-        expect(subject.pattern(:unit))
-          .to eq("spec/{bin,config,db,dependencies,factories,finders,frontend,graphql,helpers,initializers,javascripts,lib,migrations,models,policies,presenters,rack_servers,routing,rubocop,serializers,services,sidekiq,tasks,uploaders,validators,views,workers,elastic_integration}{,/**/}*_spec.rb")
-      end
-    end
-
-    context 'when level is integration' do
-      it 'returns a pattern' do
-        expect(subject.pattern(:integration))
-          .to eq("spec/{controllers,mailers,requests}{,/**/}*_spec.rb")
-      end
-    end
-
-    context 'when level is system' do
-      it 'returns a pattern' do
-        expect(subject.pattern(:system))
-          .to eq("spec/{features}{,/**/}*_spec.rb")
-      end
-    end
-
-    context 'with a prefix' do
-      it 'returns a pattern' do
-        expect(described_class.new('ee/').pattern(:system))
-          .to eq("ee/spec/{features}{,/**/}*_spec.rb")
-      end
-    end
-
-    describe 'performance' do
-      it 'memoizes the pattern for a given level' do
-        expect(subject.pattern(:system).object_id).to eq(subject.pattern(:system).object_id)
-      end
-
-      it 'freezes the pattern for a given level' do
-        expect(subject.pattern(:system)).to be_frozen
-      end
-    end
-  end
-
-  describe '#regexp' do
-    context 'when level is unit' do
-      it 'returns a regexp' do
-        expect(subject.regexp(:unit))
-          .to eq(%r{spec/(bin|config|db|dependencies|factories|finders|frontend|graphql|helpers|initializers|javascripts|lib|migrations|models|policies|presenters|rack_servers|routing|rubocop|serializers|services|sidekiq|tasks|uploaders|validators|views|workers|elastic_integration)})
-      end
-    end
-
-    context 'when level is integration' do
-      it 'returns a regexp' do
-        expect(subject.regexp(:integration))
-          .to eq(%r{spec/(controllers|mailers|requests)})
-      end
-    end
-
-    context 'when level is system' do
-      it 'returns a regexp' do
-        expect(subject.regexp(:system))
-          .to eq(%r{spec/(features)})
-      end
-    end
-
-    context 'with a prefix' do
-      it 'returns a regexp' do
-        expect(described_class.new('ee/').regexp(:system))
-          .to eq(%r{ee/spec/(features)})
-      end
-    end
-
-    describe 'performance' do
-      it 'memoizes the regexp for a given level' do
-        expect(subject.regexp(:system).object_id).to eq(subject.regexp(:system).object_id)
-      end
-
-      it 'freezes the regexp for a given level' do
-        expect(subject.regexp(:system)).to be_frozen
-      end
-    end
-  end
-
-  describe '#level_for' do
-    it 'returns the correct level for a unit test' do
-      expect(subject.level_for('spec/models/abuse_report_spec.rb')).to eq(:unit)
-    end
-
-    it 'returns the correct level for an integration test' do
-      expect(subject.level_for('spec/mailers/abuse_report_mailer_spec.rb')).to eq(:integration)
-    end
-
-    it 'returns the correct level for a system test' do
-      expect(subject.level_for('spec/features/abuse_report_spec.rb')).to eq(:system)
-    end
-
-    it 'raises an error for an unknown level' do
-      expect { subject.level_for('spec/unknown/foo_spec.rb') }
-        .to raise_error(described_class::UnknownTestLevelError,
-          %r{Test level for spec/unknown/foo_spec.rb couldn't be set. Please rename the file properly or change the test level detection regexes in .+/lib/quality/test_level.rb.})
-    end
-  end
-end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index a757747722084e90e9f2bbc943352851ad1aea2f..62c8e5adc4c770391c0852ebb81f1e8cd8a700ef 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -46,8 +46,6 @@
 Dir[Rails.root.join("spec/support/shared_examples/*.rb")].each { |f| require f }
 Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
 
-quality_level = Quality::TestLevel.new
-
 RSpec.configure do |config|
   config.use_transactional_fixtures = false
   config.use_instantiated_fixtures  = false
@@ -59,10 +57,9 @@
   config.infer_spec_type_from_file_location!
   config.full_backtrace = !!ENV['CI']
 
-  config.define_derived_metadata(file_path: %r{(ee)?/spec/.+_spec\.rb\z}) do |metadata|
+  config.define_derived_metadata(file_path: %r{/spec/}) do |metadata|
     location = metadata[:location]
 
-    metadata[:level] = quality_level.level_for(location)
     metadata[:api] = true if location =~ %r{/spec/requests/api/}
 
     # do not overwrite type if it's already set
diff --git a/spec/support/shared_examples/finders/assignees_filter_shared_examples.rb b/spec/support/shared_examples/finders/assignees_filter_spec.rb
similarity index 100%
rename from spec/support/shared_examples/finders/assignees_filter_shared_examples.rb
rename to spec/support/shared_examples/finders/assignees_filter_spec.rb
diff --git a/spec/support/shared_examples/models/atomic_internal_id_shared_examples.rb b/spec/support/shared_examples/models/atomic_internal_id_spec.rb
similarity index 100%
rename from spec/support/shared_examples/models/atomic_internal_id_shared_examples.rb
rename to spec/support/shared_examples/models/atomic_internal_id_spec.rb
diff --git a/spec/support/shared_examples/models/chat_service_shared_examples.rb b/spec/support/shared_examples/models/chat_service_spec.rb
similarity index 100%
rename from spec/support/shared_examples/models/chat_service_shared_examples.rb
rename to spec/support/shared_examples/models/chat_service_spec.rb
diff --git a/spec/support/shared_examples/models/update_project_statistics_shared_examples.rb b/spec/support/shared_examples/models/update_project_statistics_spec.rb
similarity index 100%
rename from spec/support/shared_examples/models/update_project_statistics_shared_examples.rb
rename to spec/support/shared_examples/models/update_project_statistics_spec.rb
diff --git a/spec/support/shared_examples/requests/api/issues_shared_examples.rb b/spec/support/shared_examples/requests/api/issues_shared_example_spec.rb
similarity index 100%
rename from spec/support/shared_examples/requests/api/issues_shared_examples.rb
rename to spec/support/shared_examples/requests/api/issues_shared_example_spec.rb