gitlab-org--gitlab-foss/spec
Stan Hu 575dced5d7 If migrations are pending, make CurrentSettings use existing values and populate missing columns with defaults
master was failing because `ApplicationSetting.create_from_defaults` attempted
to write to a column that did not exist in the database. This occurred in a
`rake db:migrate` task, which was unable to perform the migration that would
have added the missing column in the first place.

In 9.3 RC2, we also had a bug where password sign-ins were disabled because
there were many pending migrations. The problem occurred because
`fake_application_settings` was being returned with an OpenStruct that did not
include the predicate method `signup_enabled?`. As a result, the value would
erroneously return `nil` instead of `true`. This commit uses the values of the
defaults to mimic this behavior.

This commit also refactors some of the logic to be clearer.
2017-06-19 09:54:48 -07:00
..
bin
config
controllers Merge branch 'tc-fix-group-finder-subgrouping' into 'master' 2017-06-16 17:51:35 +00:00
db/production
factories If migrations are pending, make CurrentSettings use existing values and populate missing columns with defaults 2017-06-19 09:54:48 -07:00
features Merge branch 'remove_unnecessary_spec_file' into 'master' 2017-06-16 20:49:08 +00:00
finders Merge branch 'tc-fix-group-finder-subgrouping' into 'master' 2017-06-16 17:51:35 +00:00
fixtures
helpers
initializers
javascripts Increase karma socket timeout 2017-06-16 20:40:28 +00:00
lib If migrations are pending, make CurrentSettings use existing values and populate missing columns with defaults 2017-06-19 09:54:48 -07:00
mailers
migrations Deserialise existing custom notification settings 2017-06-15 15:15:13 +01:00
models Add table for files in merge request diffs 2017-06-16 18:30:01 +01:00
policies
presenters
requests Improve method names and add more specs 2017-06-16 12:03:15 -03:00
routing
rubocop/cop
serializers
services Merge branch '27070-rename-slash-commands-to-quick-actions' into 'master' 2017-06-16 16:32:53 +00:00
sidekiq/cron
support Merge branch '33779-reset-session-before-blocking-requests' into 'master' 2017-06-16 17:38:22 +00:00
tasks
unicorn
uploaders
validators
views
workers
factories_spec.rb
rails_helper.rb
rake_helper.rb
simplecov_env.rb
spec_helper.rb