From 854614e002306658f73a3c19c6d0a8d290ad4a67 Mon Sep 17 00:00:00 2001 From: Praveen Arimbrathodiyil Date: Sun, 18 Sep 2016 11:32:55 +0530 Subject: [PATCH] use optional groups for test --- .../0100-remove-development-test.patch | 82 ++++++++++++++----- debian/tests/spec | 20 +---- 2 files changed, 63 insertions(+), 39 deletions(-) diff --git a/debian/patches/0100-remove-development-test.patch b/debian/patches/0100-remove-development-test.patch index a5193ff0df..2661fbfa31 100644 --- a/debian/patches/0100-remove-development-test.patch +++ b/debian/patches/0100-remove-development-test.patch @@ -2,7 +2,7 @@ Bundler will fail when it can't find these locally --- a/Gemfile +++ b/Gemfile -@@ -245,88 +245,6 @@ +@@ -245,87 +245,66 @@ gem 'influxdb', '~> 0.2', require: false end @@ -37,16 +37,29 @@ Bundler will fail when it can't find these locally - gem 'database_cleaner', '~> 1.5.0' - gem 'factory_girl_rails', '~> 4.6.0' - gem 'rspec-rails', '~> 3.5.0' -- gem 'rspec-retry', '~> 0.4.5' ++group :development, :test, optional: true do ++# gem 'byebug', '~> 8.2.1', platform: :mri ++# gem 'pry-rails', '~> 0.3.4' ++# ++# gem 'awesome_print', '~> 1.2.0', require: false ++# gem 'fuubar', '~> 2.0.0' ++ ++ gem 'database_cleaner', '~> 1.5' ++ gem 'factory_girl_rails', '~> 4.6' ++ gem 'rspec-rails', '~> 3.4' + gem 'rspec-retry', '~> 0.4.5' - gem 'spinach-rails', '~> 0.2.1' - gem 'spinach-rerun-reporter', '~> 0.0.2' -- -- # Prevent occasions where minitest is not bundled in packaged versions of ruby (see #3826) -- gem 'minitest', '~> 5.7.0' -- -- # Generate Fake data ++# gem 'spinach-rails', '~> 0.2.1' ++# gem 'spinach-rerun-reporter', '~> 0.0.2' + + # Prevent occasions where minitest is not bundled in packaged versions of ruby (see #3826) + gem 'minitest', '~> 5.7.0' + + # Generate Fake data - gem 'ffaker', '~> 2.0.0' -- ++ gem 'ffaker', '~> 2.0' + - gem 'capybara', '~> 2.6.2' - gem 'capybara-screenshot', '~> 1.0.0' - gem 'poltergeist', '~> 1.9.0' @@ -66,13 +79,35 @@ Bundler will fail when it can't find these locally - gem 'flog', '~> 4.3.2', require: false - gem 'flay', '~> 2.6.1', require: false - gem 'bundler-audit', '~> 0.5.0', require: false -- ++ gem 'capybara', '~> 2.6', '>= 2.6.2' ++ gem 'capybara-screenshot', '~> 1.0' ++ gem 'poltergeist', '~> 1.9' ++ ++# gem 'teaspoon', '~> 1.1.0' ++# gem 'teaspoon-jasmine', '~> 2.2.0' ++ ++# gem 'spring', '~> 1.7.0' ++# gem 'spring-commands-rspec', '~> 1.0.4' ++# gem 'spring-commands-spinach', '~> 1.1.0' ++# gem 'spring-commands-teaspoon', '~> 0.0.2' ++ ++# gem 'rubocop', '~> 0.41.2', require: false ++# gem 'rubocop-rspec', '~> 1.5.0', require: false ++# gem 'scss_lint', '~> 0.47.0', require: false ++# gem 'simplecov', '0.12.0', require: false ++# gem 'flog', '~> 4.3.2', require: false ++# gem 'flay', '~> 2.6.1', require: false ++# gem 'bundler-audit', '~> 0.5.0', require: false + - gem 'benchmark-ips', '~> 2.3.0', require: false -- ++# gem 'benchmark-ips', '~> 2.3.0', require: false + - gem 'license_finder', '~> 2.1.0', require: false - gem 'knapsack', '~> 1.11.0' --end -- ++# gem 'license_finder', '~> 2.1.0', require: false ++# gem 'knapsack', '~> 1.11.0' + end + -group :test do - gem 'shoulda-matchers', '~> 2.8.0', require: false - gem 'email_spec', '~> 1.6.0' @@ -80,14 +115,21 @@ Bundler will fail when it can't find these locally - gem 'webmock', '~> 1.21.0' - gem 'test_after_commit', '~> 0.4.2' - gem 'sham_rack', '~> 1.3.6' --end -- --group :production do -- gem 'gitlab_meta', '7.0' --end -- ++group :test, optional: true do ++ gem 'shoulda-matchers', '~> 2.8', require: false ++ gem 'email_spec', '~> 1.6' ++ gem 'json-schema', '~> 2.6', '>= 2.6.2' ++ gem 'webmock', '~> 1.21' ++# gem 'test_after_commit', '~> 0.4.2' ++# gem 'sham_rack', '~> 1.3.6' + end + + group :production do + gem 'gitlab_meta', '7.0' + end + -gem 'newrelic_rpm', '~> 3.16' -- ++#gem 'newrelic_rpm', '~> 3.16' + gem 'octokit', '~> 4.3' - gem 'mail_room', '~> 0.8' diff --git a/debian/tests/spec b/debian/tests/spec index 3fa34eab47..460eb3aed3 100755 --- a/debian/tests/spec +++ b/debian/tests/spec @@ -15,26 +15,8 @@ set -ex cd /usr/share/gitlab su gitlab -c 'truncate -s 0 Gemfile.lock' -if ! grep factory_girl_rails Gemfile >/dev/null; then - cp Gemfile ${ADTTMP} - cat <> ${ADTTMP}/Gemfile -gem 'factory_girl_rails', '~> 4.6' -gem 'rspec-rails', '~> 3.4' -gem 'rspec-retry', '~> 0.4.3' -gem 'capybara', '~> 2.5' -gem 'poltergeist', '~> 1.9' -gem 'capybara-screenshot', '~> 1.0' -gem 'database_cleaner', '~> 1.5' -gem 'shoulda-matchers', '~> 2.8', require: false -gem 'email_spec', '~> 1.6' -gem 'json-schema', '~> 2.6', '>= 2.6.2' -gem 'webmock', '~> 1.21' -gem 'ffaker', '~> 2.0' -EOF - su gitlab -c "cp ${ADTTMP}/Gemfile ." -fi export $(cat /etc/gitlab/gitlab-debian.conf) -su gitlab -c "bundle install --local" +su gitlab -c "bundle install --with development test --local" su gitlab -c "bundle exec rake -f ${AUTOPKGTEST_TMP}/debian/tests/spec.rake #config 2/2 failed, controllers many failed