diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/factories/snippet_repository_storage_moves.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/factories/snippet_repository_storage_moves.rb')
-rw-r--r-- | spec/factories/snippet_repository_storage_moves.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/factories/snippet_repository_storage_moves.rb b/spec/factories/snippet_repository_storage_moves.rb new file mode 100644 index 00000000000..ed65dc5374f --- /dev/null +++ b/spec/factories/snippet_repository_storage_moves.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :snippet_repository_storage_move, class: 'SnippetRepositoryStorageMove' do + container { association(:snippet) } + + source_storage_name { 'default' } + + trait :scheduled do + state { SnippetRepositoryStorageMove.state_machines[:state].states[:scheduled].value } + end + + trait :started do + state { SnippetRepositoryStorageMove.state_machines[:state].states[:started].value } + end + + trait :replicated do + state { SnippetRepositoryStorageMove.state_machines[:state].states[:replicated].value } + end + + trait :finished do + state { SnippetRepositoryStorageMove.state_machines[:state].states[:finished].value } + end + + trait :failed do + state { SnippetRepositoryStorageMove.state_machines[:state].states[:failed].value } + end + end +end |