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 Change Done column to Closed in issue boards 2017-03-24 23:40:35 +11:00
broadcast_messages.rb
chat_names.rb Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
chat_teams.rb Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
commit_statuses.rb Extend specs for code we use to calculate statuses 2017-03-06 13:54:29 +01:00
commits.rb Lint our factories creation in addition to their build 2017-06-02 19:06:50 +02:00
container_repositories.rb Ensure root container repository when visiting registry 2017-04-03 13:03:16 +02:00
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 Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
environments.rb Take branch access into account when stopping environment 2017-04-06 17:15:15 +02:00
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 Skip issuable without a project in IssuableExtractor#extract 2017-04-25 18:39:41 +08:00
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 Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
lfs_objects.rb
lfs_objects_projects.rb
lists.rb spec updates 2017-05-31 15:34:02 +01:00
merge_requests.rb Don't delete a branch involved in an open merge request in "Delete all merged branches" service 2017-04-19 07:56:08 -07:00
merge_requests_closing_issues.rb Add issues/:iid/closed_by api endpoint 2017-04-12 14:38:00 +03:00
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 Implement OpenID Connect identity provider 2017-03-07 14:54:35 +01:00
oauth_access_tokens.rb Implement OpenID Connect identity provider 2017-03-07 14:54:35 +01:00
oauth_applications.rb Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
pages_domains.rb
personal_access_tokens.rb Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
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 Renamed ProtectedTag push_access_levels to create_access_levels 2017-04-04 03:38:58 +01:00
releases.rb
sent_notifications.rb Fix specs 2017-04-05 17:44:14 +01:00
sequences.rb Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
service_hooks.rb Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
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 Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
subscriptions.rb
system_hooks.rb Don't use FFaker in factories, use sequences instead 2017-04-03 18:54:48 +02:00
system_note_metadata.rb Create metadata when creating system notes 2017-03-28 15:16:41 +02:00
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