Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
be1fe010
Commit
be1fe010
authored
Dec 03, 2019
by
Alishan Ladhani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add association to serverless_domain_cluster
parent
be33ee25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
app/models/clusters/applications/knative.rb
app/models/clusters/applications/knative.rb
+2
-0
spec/models/clusters/applications/knative_spec.rb
spec/models/clusters/applications/knative_spec.rb
+4
-0
No files found.
app/models/clusters/applications/knative.rb
View file @
be1fe010
...
...
@@ -11,6 +11,8 @@ module Clusters
self
.
table_name
=
'clusters_applications_knative'
has_one
:serverless_domain_cluster
,
class_name:
'Serverless::DomainCluster'
,
foreign_key:
'clusters_applications_knative_id'
,
inverse_of: :knative
include
::
Clusters
::
Concerns
::
ApplicationCore
include
::
Clusters
::
Concerns
::
ApplicationStatus
include
::
Clusters
::
Concerns
::
ApplicationVersion
...
...
spec/models/clusters/applications/knative_spec.rb
View file @
be1fe010
...
...
@@ -16,6 +16,10 @@ describe Clusters::Applications::Knative do
allow
(
ClusterWaitForIngressIpAddressWorker
).
to
receive
(
:perform_async
)
end
describe
'associations'
do
it
{
is_expected
.
to
have_one
(
:serverless_domain_cluster
).
class_name
(
'Serverless::DomainCluster'
).
with_foreign_key
(
'clusters_applications_knative_id'
).
inverse_of
(
:knative
)
}
end
describe
'when cloud run is enabled'
do
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
:cloud_run_enabled
)
}
let
(
:knative_cloud_run
)
{
create
(
:clusters_applications_knative
,
cluster:
cluster
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment