Welcome to mirror list, hosted at ThFree Co, Russian Federation.

strategy.rb « feature_flags « operations « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8d04b6d25aa20ed998ebd0a6de59fa607ce7301b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# frozen_string_literal: true

FactoryBot.define do
  factory :operations_strategy, class: 'Operations::FeatureFlags::Strategy' do
    association :feature_flag, factory: :operations_feature_flag
    name { "default" }
    parameters { {} }

    trait :default do
      name { "default" }
      parameters { {} }
    end

    trait :gitlab_userlist do
      association :user_list, factory: :operations_feature_flag_user_list
      name { "gitlabUserList" }
      parameters { {} }
    end

    trait :flexible_rollout do
      name { "flexibleRollout" }
      parameters do
        {
          groupId: 'default',
          rollout: '10',
          stickiness: 'default'
        }
      end
    end

    trait :gradual_rollout do
      name { "gradualRolloutUserId" }
      parameters { { percentage: '10', groupId: 'default' } }
    end

    trait :userwithid do
      name { "userWithId" }
      parameters { { userIds: 'user1' } }
    end
  end
end