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 Add Conversational Development Index page to admin panel 2017-06-01 17:37:21 +02:00
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 Fix: Deleting an invited member causes 500 error 2017-05-18 16:26:39 +03:00
groups.rb Backport avatar-related spec changes from gitlab-org/gitlab-ee@4b464eaaee 2017-05-04 17:04:36 +02:00
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 spec updates 2017-05-31 15:34:02 +01:00
merge_requests.rb
merge_requests_closing_issues.rb
milestones.rb
namespaces.rb
notes.rb Support comments for personal snippets 2017-05-05 15:45:49 +02:00
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 Merge branch 'bvl-rename-build-events-to-job-events' into 'master' 2017-05-16 14:12:19 +02:00
project_members.rb Fix: Deleting an invited member causes 500 error 2017-05-18 16:26:39 +03:00
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 simplify test&save actions when setting a service integration 2017-06-01 07:47:15 +02:00
snippets.rb Support descriptions for snippets 2017-05-31 07:17:03 +02:00
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 create User#rss_token in user factory explicitely 2017-05-24 22:29:59 +02:00
web_hook_log.rb Implement web hooks logging 2017-05-25 10:07:52 +03:00
wiki_directories.rb Lint our factories creation in addition to their build 2017-06-02 19:06:50 +02:00
wiki_pages.rb