use optional groups for test

This commit is contained in:
Praveen Arimbrathodiyil 2016-09-18 11:32:55 +05:30
parent a9632cf86e
commit 854614e002
2 changed files with 63 additions and 39 deletions

View file

@ -2,7 +2,7 @@ Bundler will fail when it can't find these locally
--- a/Gemfile --- a/Gemfile
+++ b/Gemfile +++ b/Gemfile
@@ -245,88 +245,6 @@ @@ -245,87 +245,66 @@
gem 'influxdb', '~> 0.2', require: false gem 'influxdb', '~> 0.2', require: false
end end
@ -37,16 +37,29 @@ Bundler will fail when it can't find these locally
- gem 'database_cleaner', '~> 1.5.0' - gem 'database_cleaner', '~> 1.5.0'
- gem 'factory_girl_rails', '~> 4.6.0' - gem 'factory_girl_rails', '~> 4.6.0'
- gem 'rspec-rails', '~> 3.5.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-rails', '~> 0.2.1'
- gem 'spinach-rerun-reporter', '~> 0.0.2' - gem 'spinach-rerun-reporter', '~> 0.0.2'
- +# gem 'spinach-rails', '~> 0.2.1'
- # Prevent occasions where minitest is not bundled in packaged versions of ruby (see #3826) +# gem 'spinach-rerun-reporter', '~> 0.0.2'
- gem 'minitest', '~> 5.7.0'
- # Prevent occasions where minitest is not bundled in packaged versions of ruby (see #3826)
- # Generate Fake data gem 'minitest', '~> 5.7.0'
# Generate Fake data
- gem 'ffaker', '~> 2.0.0' - gem 'ffaker', '~> 2.0.0'
- + gem 'ffaker', '~> 2.0'
- gem 'capybara', '~> 2.6.2' - gem 'capybara', '~> 2.6.2'
- gem 'capybara-screenshot', '~> 1.0.0' - gem 'capybara-screenshot', '~> 1.0.0'
- gem 'poltergeist', '~> 1.9.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 'flog', '~> 4.3.2', require: false
- gem 'flay', '~> 2.6.1', require: false - gem 'flay', '~> 2.6.1', require: false
- gem 'bundler-audit', '~> 0.5.0', 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 'benchmark-ips', '~> 2.3.0', require: false
- gem 'license_finder', '~> 2.1.0', require: false - gem 'license_finder', '~> 2.1.0', require: false
- gem 'knapsack', '~> 1.11.0' - gem 'knapsack', '~> 1.11.0'
-end +# gem 'license_finder', '~> 2.1.0', require: false
- +# gem 'knapsack', '~> 1.11.0'
end
-group :test do -group :test do
- gem 'shoulda-matchers', '~> 2.8.0', require: false - gem 'shoulda-matchers', '~> 2.8.0', require: false
- gem 'email_spec', '~> 1.6.0' - 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 'webmock', '~> 1.21.0'
- gem 'test_after_commit', '~> 0.4.2' - gem 'test_after_commit', '~> 0.4.2'
- gem 'sham_rack', '~> 1.3.6' - gem 'sham_rack', '~> 1.3.6'
-end +group :test, optional: true do
- + gem 'shoulda-matchers', '~> 2.8', require: false
-group :production do + gem 'email_spec', '~> 1.6'
- gem 'gitlab_meta', '7.0' + gem 'json-schema', '~> 2.6', '>= 2.6.2'
-end + 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 'newrelic_rpm', '~> 3.16'
gem 'octokit', '~> 4.3' gem 'octokit', '~> 4.3'
gem 'mail_room', '~> 0.8'

20
debian/tests/spec vendored
View file

@ -15,26 +15,8 @@ set -ex
cd /usr/share/gitlab cd /usr/share/gitlab
su gitlab -c 'truncate -s 0 Gemfile.lock' su gitlab -c 'truncate -s 0 Gemfile.lock'
if ! grep factory_girl_rails Gemfile >/dev/null; then
cp Gemfile ${ADTTMP}
cat <<EOF >> ${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) 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 su gitlab -c "bundle exec rake -f ${AUTOPKGTEST_TMP}/debian/tests/spec.rake
#config 2/2 failed, controllers many failed #config 2/2 failed, controllers many failed