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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-06-24 00:48:16 +0300
committerThong Kuah <tkuah@gitlab.com>2019-06-27 08:28:48 +0300
commit525edec78bc39ae41284927f1866def56d21a12a (patch)
treee59fd0498b9dd9396838594a6834b0642142ae50 /spec/models/deployment_spec.rb
parent871d06993edba9220c10ef2ca5c64f412ee5f984 (diff)
Add cluster_id to deployments table as an FK
We nullify when cluster is deleted as we want to keep the deployment record around. Add cluster as an optional association We will have only cluster for deployments where the build deploys to a kubernetes cluster
Diffstat (limited to 'spec/models/deployment_spec.rb')
-rw-r--r--spec/models/deployment_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb
index a433878f3bc..341ed31d19b 100644
--- a/spec/models/deployment_spec.rb
+++ b/spec/models/deployment_spec.rb
@@ -7,6 +7,7 @@ describe Deployment do
it { is_expected.to belong_to(:project).required }
it { is_expected.to belong_to(:environment).required }
+ it { is_expected.to belong_to(:cluster).class_name('Clusters::Cluster') }
it { is_expected.to belong_to(:user) }
it { is_expected.to belong_to(:deployable) }