summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 18:09:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 18:09:34 +0000
commit141902c04943d5fb43c014b8cf42af60a3bc0cdf (patch)
tree7e5a31fe9b0434fa0071cb5d09273669c3a8acab /spec/factories
parent209bd8cf1f542f6ba2a069b368a9187faa871e96 (diff)
downloadgitlab-ce-141902c04943d5fb43c014b8cf42af60a3bc0cdf.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/group_group_links.rb8
-rw-r--r--spec/factories/project_group_links.rb5
-rw-r--r--spec/factories/usage_data.rb4
3 files changed, 15 insertions, 2 deletions
diff --git a/spec/factories/group_group_links.rb b/spec/factories/group_group_links.rb
index 0711a15b8dd..6f98886faff 100644
--- a/spec/factories/group_group_links.rb
+++ b/spec/factories/group_group_links.rb
@@ -4,6 +4,12 @@ FactoryBot.define do
factory :group_group_link do
shared_group { create(:group) }
shared_with_group { create(:group) }
- group_access { GroupMember::DEVELOPER }
+ group_access { Gitlab::Access::DEVELOPER }
+
+ trait(:guest) { group_access { Gitlab::Access::GUEST } }
+ trait(:reporter) { group_access { Gitlab::Access::REPORTER } }
+ trait(:developer) { group_access { Gitlab::Access::DEVELOPER } }
+ trait(:owner) { group_access { Gitlab::Access::OWNER } }
+ trait(:maintainer) { group_access { Gitlab::Access::MAINTAINER } }
end
end
diff --git a/spec/factories/project_group_links.rb b/spec/factories/project_group_links.rb
index 3c8c7a34680..b9119a5788b 100644
--- a/spec/factories/project_group_links.rb
+++ b/spec/factories/project_group_links.rb
@@ -5,5 +5,10 @@ FactoryBot.define do
project
group
expires_at { nil }
+
+ trait(:guest) { group_access { Gitlab::Access::GUEST } }
+ trait(:reporter) { group_access { Gitlab::Access::REPORTER } }
+ trait(:developer) { group_access { Gitlab::Access::DEVELOPER } }
+ trait(:maintainer) { group_access { Gitlab::Access::MAINTAINER } }
end
end
diff --git a/spec/factories/usage_data.rb b/spec/factories/usage_data.rb
index da69a0fb844..b633038b83b 100644
--- a/spec/factories/usage_data.rb
+++ b/spec/factories/usage_data.rb
@@ -39,12 +39,14 @@ FactoryBot.define do
gcp_cluster = create(:cluster_provider_gcp, :created).cluster
create(:cluster_provider_aws, :created)
create(:cluster_platform_kubernetes)
+ create(:cluster, :management_project, management_project: projects[0])
create(:cluster, :group)
+ create(:cluster, :instance, :production_environment)
# Disabled clusters
create(:cluster, :disabled)
create(:cluster, :group, :disabled)
- create(:cluster, :group, :disabled)
+ create(:cluster, :instance, :disabled)
# Applications
create(:clusters_applications_helm, :installed, cluster: gcp_cluster)