Add association project -> kubernetes_namespaces

kubernetes_namespaces is not needed for project import/export as it
tracks internal state of kubernetes integration
This commit is contained in:
Thong Kuah 2018-11-23 16:28:16 +13:00
parent e9eccee9ae
commit 703233e1e9
3 changed files with 3 additions and 0 deletions

View File

@ -238,6 +238,7 @@ class Project < ActiveRecord::Base
has_one :cluster_project, class_name: 'Clusters::Project'
has_many :clusters, through: :cluster_project, class_name: 'Clusters::Cluster'
has_many :cluster_ingresses, through: :clusters, source: :application_ingress, class_name: 'Clusters::Applications::Ingress'
has_many :kubernetes_namespaces, class_name: 'Clusters::KubernetesNamespace'
has_many :prometheus_metrics

View File

@ -304,6 +304,7 @@ project:
- import_export_upload
- repository_languages
- pool_repository
- kubernetes_namespaces
award_emoji:
- awardable
- user

View File

@ -87,6 +87,7 @@ describe Project do
it { is_expected.to have_many(:pipeline_schedules) }
it { is_expected.to have_many(:members_and_requesters) }
it { is_expected.to have_many(:clusters) }
it { is_expected.to have_many(:kubernetes_namespaces) }
it { is_expected.to have_many(:custom_attributes).class_name('ProjectCustomAttribute') }
it { is_expected.to have_many(:project_badges).class_name('ProjectBadge') }
it { is_expected.to have_many(:lfs_file_locks) }