gitlab-org--gitlab-foss/spec/factories
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
..
ci Send new configuration options with job's payload 2017-06-12 12:58:35 +02:00
abuse_reports.rb
appearances.rb
application_settings.rb If migrations are pending, make CurrentSettings use existing values and populate missing columns with defaults 2017-06-19 09:54:48 -07:00
award_emoji.rb
boards.rb
broadcast_messages.rb
chat_names.rb
chat_teams.rb
commit_statuses.rb
commits.rb Lint our factories creation in addition to their build 2017-06-02 19:06:50 +02:00
container_repositories.rb
conversational_development_index_metrics.rb
deploy_keys_projects.rb
deployments.rb
emails.rb
environments.rb
events.rb
file_uploaders.rb Lint our factories creation in addition to their build 2017-06-02 19:06:50 +02:00
forked_project_links.rb backports changed import logic from pull mirroring feature into CE 2017-06-05 23:09:10 +01:00
group_members.rb
groups.rb
identities.rb
issues.rb
keys.rb Lint our factories creation in addition to their build 2017-06-02 19:06:50 +02:00
label_links.rb
label_priorities.rb
labels.rb
lfs_objects.rb
lfs_objects_projects.rb
lists.rb
merge_requests.rb
merge_requests_closing_issues.rb
milestones.rb
namespaces.rb
notes.rb
notification_settings.rb
oauth_access_grants.rb
oauth_access_tokens.rb
oauth_applications.rb
pages_domains.rb
personal_access_tokens.rb
personal_snippets.rb
project_group_links.rb
project_hooks.rb
project_members.rb
project_snippets.rb
project_statistics.rb Lint our factories creation in addition to their build 2017-06-02 19:06:50 +02:00
project_wikis.rb Lint our factories creation in addition to their build 2017-06-02 19:06:50 +02:00
projects.rb Merge branch 'pull-mirror-overhaul-ce-backport' into 'master' 2017-06-05 23:40:53 +00:00
protected_branches.rb
protected_tags.rb
releases.rb
sent_notifications.rb
sequences.rb
service_hooks.rb
services.rb
snippets.rb
spam_logs.rb
subscriptions.rb
system_hooks.rb
system_note_metadata.rb
timelogs.rb
todos.rb
trending_project.rb
u2f_registrations.rb
uploads.rb Bring in security changes from the 9.2.5 release 2017-06-07 21:16:20 -07:00
user_agent_details.rb
users.rb
web_hook_log.rb
wiki_directories.rb Lint our factories creation in addition to their build 2017-06-02 19:06:50 +02:00
wiki_pages.rb