Commit 94bb6604 authored by Thong Kuah's avatar Thong Kuah

Add frozen_string_literal to spec/factories

Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
parent 9e91ae15
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :abuse_report do factory :abuse_report do
reporter factory: :user reporter factory: :user
......
# frozen_string_literal: true
# Read about factories at https://github.com/thoughtbot/factory_bot # Read about factories at https://github.com/thoughtbot/factory_bot
FactoryBot.define do FactoryBot.define do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :application_setting do factory :application_setting do
default_projects_limit 42 default_projects_limit 42
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :award_emoji do factory :award_emoji do
name "thumbsup" name "thumbsup"
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
trait :base_badge do trait :base_badge do
link_url { generate(:url) } link_url { generate(:url) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :board do factory :board do
transient do transient do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :broadcast_message do factory :broadcast_message do
message "MyText" message "MyText"
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :chat_name, class: ChatName do factory :chat_name, class: ChatName do
user factory: :user user factory: :user
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :chat_team, class: ChatTeam do factory :chat_team, class: ChatTeam do
sequence(:team_id) { |n| "abcdefghijklm#{n}" } sequence(:team_id) { |n| "abcdefghijklm#{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_bridge, class: Ci::Bridge do factory :ci_bridge, class: Ci::Bridge do
name 'bridge' name 'bridge'
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_build_trace_chunk, class: Ci::BuildTraceChunk do factory :ci_build_trace_chunk, class: Ci::BuildTraceChunk do
build factory: :ci_build build factory: :ci_build
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_build_trace_section_name, class: Ci::BuildTraceSectionName do factory :ci_build_trace_section_name, class: Ci::BuildTraceSectionName do
sequence(:name) { |n| "section_#{n}" } sequence(:name) { |n| "section_#{n}" }
......
# frozen_string_literal: true
include ActionDispatch::TestProcess include ActionDispatch::TestProcess
FactoryBot.define do FactoryBot.define do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_group_variable, class: Ci::GroupVariable do factory :ci_group_variable, class: Ci::GroupVariable do
sequence(:key) { |n| "VARIABLE_#{n}" } sequence(:key) { |n| "VARIABLE_#{n}" }
......
# frozen_string_literal: true
include ActionDispatch::TestProcess include ActionDispatch::TestProcess
FactoryBot.define do FactoryBot.define do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_pipeline_schedule, class: Ci::PipelineSchedule do factory :ci_pipeline_schedule, class: Ci::PipelineSchedule do
cron '0 1 * * *' cron '0 1 * * *'
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_pipeline_schedule_variable, class: Ci::PipelineScheduleVariable do factory :ci_pipeline_schedule_variable, class: Ci::PipelineScheduleVariable do
sequence(:key) { |n| "VARIABLE_#{n}" } sequence(:key) { |n| "VARIABLE_#{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_pipeline_variable, class: Ci::PipelineVariable do factory :ci_pipeline_variable, class: Ci::PipelineVariable do
sequence(:key) { |n| "VARIABLE_#{n}" } sequence(:key) { |n| "VARIABLE_#{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_empty_pipeline, class: Ci::Pipeline do factory :ci_empty_pipeline, class: Ci::Pipeline do
source :push source :push
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_runner_project, class: Ci::RunnerProject do factory :ci_runner_project, class: Ci::RunnerProject do
runner factory: [:ci_runner, :project] runner factory: [:ci_runner, :project]
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_runner, class: Ci::Runner do factory :ci_runner, class: Ci::Runner do
sequence(:description) { |n| "My runner#{n}" } sequence(:description) { |n| "My runner#{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_stage, class: Ci::LegacyStage do factory :ci_stage, class: Ci::LegacyStage do
skip_create skip_create
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_trigger_request, class: Ci::TriggerRequest do factory :ci_trigger_request, class: Ci::TriggerRequest do
trigger factory: :ci_trigger trigger factory: :ci_trigger
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_trigger_without_token, class: Ci::Trigger do factory :ci_trigger_without_token, class: Ci::Trigger do
owner owner
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_variable, class: Ci::Variable do factory :ci_variable, class: Ci::Variable do
sequence(:key) { |n| "VARIABLE_#{n}" } sequence(:key) { |n| "VARIABLE_#{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :clusters_applications_helm, class: Clusters::Applications::Helm do factory :clusters_applications_helm, class: Clusters::Applications::Helm do
cluster factory: %i(cluster provided_by_gcp) cluster factory: %i(cluster provided_by_gcp)
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :cluster, class: Clusters::Cluster do factory :cluster, class: Clusters::Cluster do
user user
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :cluster_platform_kubernetes, class: Clusters::Platforms::Kubernetes do factory :cluster_platform_kubernetes, class: Clusters::Platforms::Kubernetes do
cluster cluster
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :cluster_provider_gcp, class: Clusters::Providers::Gcp do factory :cluster_provider_gcp, class: Clusters::Providers::Gcp do
cluster cluster
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :commit_status, class: CommitStatus do factory :commit_status, class: CommitStatus do
name 'default' name 'default'
......
# frozen_string_literal: true
require_relative '../support/helpers/repo_helpers' require_relative '../support/helpers/repo_helpers'
FactoryBot.define do FactoryBot.define do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :container_repository do factory :container_repository do
name 'test_image' name 'test_image'
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :conversational_development_index_metric, class: ConversationalDevelopmentIndex::Metric do factory :conversational_development_index_metric, class: ConversationalDevelopmentIndex::Metric do
leader_issues 9.256 leader_issues 9.256
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :deploy_keys_project do factory :deploy_keys_project do
deploy_key deploy_key
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :deploy_token do factory :deploy_token do
token { SecureRandom.hex(50) } token { SecureRandom.hex(50) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :deployment, class: Deployment do factory :deployment, class: Deployment do
sha 'b83d6e391c22777fca1ed3012fce84f633d7fed0' sha 'b83d6e391c22777fca1ed3012fce84f633d7fed0'
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :email do factory :email do
user user
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :environment, class: Environment do factory :environment, class: Environment do
sequence(:name) { |n| "environment#{n}" } sequence(:name) { |n| "environment#{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :event do factory :event do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :file_uploader do factory :file_uploader do
skip_create skip_create
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :fork_network_member do factory :fork_network_member do
association :project association :project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :fork_network do factory :fork_network do
association :root_project, factory: :project association :root_project, factory: :project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
sequence(:gitaly_commit_id) { Digest::SHA1.hexdigest(Time.now.to_f.to_s) } sequence(:gitaly_commit_id) { Digest::SHA1.hexdigest(Time.now.to_f.to_s) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :gitaly_commit_author, class: Gitaly::CommitAuthor do factory :gitaly_commit_author, class: Gitaly::CommitAuthor do
skip_create skip_create
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :gitaly_tag, class: Gitaly::Tag do factory :gitaly_tag, class: Gitaly::Tag do
skip_create skip_create
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :gpg_key_subkey do factory :gpg_key_subkey do
gpg_key gpg_key
......
# frozen_string_literal: true
require_relative '../support/helpers/gpg_helpers' require_relative '../support/helpers/gpg_helpers'
FactoryBot.define do FactoryBot.define do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :gpg_signature do factory :gpg_signature do
commit_sha { Digest::SHA1.hexdigest(SecureRandom.hex) } commit_sha { Digest::SHA1.hexdigest(SecureRandom.hex) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :group_custom_attribute do factory :group_custom_attribute do
group group
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :group_member do factory :group_member do
access_level { GroupMember::OWNER } access_level { GroupMember::OWNER }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :group, class: Group, parent: :namespace do factory :group, class: Group, parent: :namespace do
sequence(:name) { |n| "group#{n}" } sequence(:name) { |n| "group#{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :identity do factory :identity do
provider 'ldapmain' provider 'ldapmain'
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :import_export_upload do factory :import_export_upload do
project { create(:project) } project { create(:project) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :import_state, class: ProjectImportState do factory :import_state, class: ProjectImportState do
status :none status :none
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :instance_configuration do factory :instance_configuration do
skip_create skip_create
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :internal_id do factory :internal_id do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :issue do factory :issue do
title { generate(:title) } title { generate(:title) }
......
# frozen_string_literal: true
require_relative '../support/helpers/key_generator_helper' require_relative '../support/helpers/key_generator_helper'
FactoryBot.define do FactoryBot.define do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :label_link do factory :label_link do
label label
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :label_priority do factory :label_priority do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
trait :base_label do trait :base_label do
title { generate(:label_title) } title { generate(:label_title) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :lfs_file_lock do factory :lfs_file_lock do
user user
......
# frozen_string_literal: true
include ActionDispatch::TestProcess include ActionDispatch::TestProcess
FactoryBot.define do FactoryBot.define do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :lfs_objects_project do factory :lfs_objects_project do
lfs_object lfs_object
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :list do factory :list do
board board
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :merge_request do factory :merge_request do
title { generate(:title) } title { generate(:title) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :merge_requests_closing_issues do factory :merge_requests_closing_issues do
issue issue
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :milestone do factory :milestone do
title title
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :namespace do factory :namespace do
sequence(:name) { |n| "namespace#{n}" } sequence(:name) { |n| "namespace#{n}" }
......
# frozen_string_literal: true
require_relative '../support/helpers/repo_helpers' require_relative '../support/helpers/repo_helpers'
include ActionDispatch::TestProcess include ActionDispatch::TestProcess
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :notification_setting do factory :notification_setting do
source factory: :project source factory: :project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :oauth_access_grant do factory :oauth_access_grant do
resource_owner_id { create(:user).id } resource_owner_id { create(:user).id }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :oauth_access_token do factory :oauth_access_token do
resource_owner resource_owner
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :oauth_application, class: 'Doorkeeper::Application', aliases: [:application] do factory :oauth_application, class: 'Doorkeeper::Application', aliases: [:application] do
sequence(:name) { |n| "OAuth App #{n}" } sequence(:name) { |n| "OAuth App #{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :pages_domain, class: 'PagesDomain' do factory :pages_domain, class: 'PagesDomain' do
sequence(:domain) { |n| "my#{n}.domain.com" } sequence(:domain) { |n| "my#{n}.domain.com" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :personal_access_token do factory :personal_access_token do
user user
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :pool_repository do factory :pool_repository do
shard { Shard.by_name("default") } shard { Shard.by_name("default") }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :programming_language do factory :programming_language do
name 'Ruby' name 'Ruby'
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :project_auto_devops do factory :project_auto_devops do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :project_custom_attribute do factory :project_custom_attribute do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :project_deploy_token do factory :project_deploy_token do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :project_group_link do factory :project_group_link do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :project_hook do factory :project_hook do
url { generate(:url) } url { generate(:url) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :project_member do factory :project_member do
user user
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :project_statistics do factory :project_statistics do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :project_wiki do factory :project_wiki do
skip_create skip_create
......
# frozen_string_literal: true
require_relative '../support/helpers/test_env' require_relative '../support/helpers/test_env'
FactoryBot.define do FactoryBot.define do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :protected_branch do factory :protected_branch do
name name
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :protected_tag do factory :protected_tag do
name name
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :redirect_route do factory :redirect_route do
sequence(:path) { |n| "redirect#{n}" } sequence(:path) { |n| "redirect#{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :release do factory :release do
tag "v1.1.0" tag "v1.1.0"
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :remote_mirror, class: 'RemoteMirror' do factory :remote_mirror, class: 'RemoteMirror' do
association :project, :repository association :project, :repository
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :repository_language do factory :repository_language do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :sent_notification do factory :sent_notification do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
sequence(:username) { |n| "user#{n}" } sequence(:username) { |n| "user#{n}" }
sequence(:name) { |n| "John Doe#{n}" } sequence(:name) { |n| "John Doe#{n}" }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :service_hook do factory :service_hook do
url { generate(:url) } url { generate(:url) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :service do factory :service do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :shard do factory :shard do
name "default" name "default"
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :snippet do factory :snippet do
author author
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :spam_log do factory :spam_log do
user user
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :subscription do factory :subscription do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :system_hook do factory :system_hook do
url { generate(:url) } url { generate(:url) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :system_note_metadata do factory :system_note_metadata do
note note
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :term_agreement do factory :term_agreement do
term term
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :term, class: ApplicationSetting::Term do factory :term, class: ApplicationSetting::Term do
terms "Lorem ipsum dolor sit amet, consectetur adipiscing elit." terms "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
......
# frozen_string_literal: true
# Read about factories at https://github.com/thoughtbot/factory_bot # Read about factories at https://github.com/thoughtbot/factory_bot
FactoryBot.define do FactoryBot.define do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :todo do factory :todo do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
# TrendingProject # TrendingProject
factory :trending_project, class: 'TrendingProject' do factory :trending_project, class: 'TrendingProject' do
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :u2f_registration do factory :u2f_registration do
certificate { FFaker::BaconIpsum.characters(728) } certificate { FFaker::BaconIpsum.characters(728) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :upload do factory :upload do
model { build(:project) } model { build(:project) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :user_agent_detail do factory :user_agent_detail do
ip_address '127.0.0.1' ip_address '127.0.0.1'
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :user_callout do factory :user_callout do
feature_name :gke_cluster_integration feature_name :gke_cluster_integration
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :user_custom_attribute do factory :user_custom_attribute do
user user
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :user, aliases: [:author, :assignee, :recipient, :owner, :resource_owner] do factory :user, aliases: [:author, :assignee, :recipient, :owner, :resource_owner] do
email { generate(:email) } email { generate(:email) }
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :users_star_project do factory :users_star_project do
project project
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :web_hook_log do factory :web_hook_log do
web_hook factory: :project_hook web_hook factory: :project_hook
......
# frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :wiki_directory do factory :wiki_directory do
skip_create skip_create
......
# frozen_string_literal: true
require 'ostruct' require 'ostruct'
FactoryBot.define do FactoryBot.define do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment