diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /spec/factories/projects.rb | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'spec/factories/projects.rb')
-rw-r--r-- | spec/factories/projects.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 8a406f95f58..ef1313541f8 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -35,6 +35,7 @@ FactoryBot.define do metrics_dashboard_access_level { ProjectFeature::PRIVATE } operations_access_level { ProjectFeature::ENABLED } container_registry_access_level { ProjectFeature::ENABLED } + security_and_compliance_access_level { ProjectFeature::PRIVATE } # we can't assign the delegated `#ci_cd_settings` attributes directly, as the # `#ci_cd_settings` relation needs to be created first @@ -70,7 +71,8 @@ FactoryBot.define do metrics_dashboard_access_level: evaluator.metrics_dashboard_access_level, operations_access_level: evaluator.operations_access_level, analytics_access_level: evaluator.analytics_access_level, - container_registry_access_level: evaluator.container_registry_access_level + container_registry_access_level: evaluator.container_registry_access_level, + security_and_compliance_access_level: evaluator.security_and_compliance_access_level } project.build_project_feature(hash) @@ -82,7 +84,7 @@ FactoryBot.define do # user have access to the project. Our specs don't use said service class, # thus we must manually refresh things here. unless project.group || project.pending_delete - project.add_maintainer(project.first_owner) + project.add_owner(project.first_owner) end project.group&.refresh_members_authorized_projects @@ -154,6 +156,10 @@ FactoryBot.define do archived { true } end + trait :hidden do + hidden { true } + end + trait :last_repository_check_failed do last_repository_check_failed { true } end @@ -355,6 +361,9 @@ FactoryBot.define do trait(:container_registry_enabled) { container_registry_access_level { ProjectFeature::ENABLED } } trait(:container_registry_disabled) { container_registry_access_level { ProjectFeature::DISABLED } } trait(:container_registry_private) { container_registry_access_level { ProjectFeature::PRIVATE } } + trait(:security_and_compliance_enabled) { security_and_compliance_access_level { ProjectFeature::ENABLED } } + trait(:security_and_compliance_disabled) { security_and_compliance_access_level { ProjectFeature::DISABLED } } + trait(:security_and_compliance_private) { security_and_compliance_access_level { ProjectFeature::PRIVATE } } trait :auto_devops do association :auto_devops, factory: :project_auto_devops @@ -379,6 +388,10 @@ FactoryBot.define do service_desk_enabled { true } end + trait :with_error_tracking_setting do + error_tracking_setting { association :project_error_tracking_setting } + end + # Project with empty repository # # This is a case when you just created a project |