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