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
6196bb6a
Commit
6196bb6a
authored
Nov 20, 2018
by
Amit Rathi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing tests
parent
6eced5ff
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
1 deletion
+27
-1
spec/factories/clusters/applications/helm.rb
spec/factories/clusters/applications/helm.rb
+4
-0
spec/javascripts/clusters/services/mock_data.js
spec/javascripts/clusters/services/mock_data.js
+11
-0
spec/javascripts/clusters/stores/clusters_store_spec.js
spec/javascripts/clusters/stores/clusters_store_spec.js
+7
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+3
-0
spec/models/clusters/cluster_spec.rb
spec/models/clusters/cluster_spec.rb
+2
-1
No files found.
spec/factories/clusters/applications/helm.rb
View file @
6196bb6a
...
@@ -49,6 +49,10 @@ FactoryBot.define do
...
@@ -49,6 +49,10 @@ FactoryBot.define do
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
end
end
factory
:clusters_applications_prometheus
,
class:
Clusters
::
Applications
::
CertManager
do
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
end
factory
:clusters_applications_prometheus
,
class:
Clusters
::
Applications
::
Prometheus
do
factory
:clusters_applications_prometheus
,
class:
Clusters
::
Applications
::
Prometheus
do
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
end
end
...
...
spec/javascripts/clusters/services/mock_data.js
View file @
6196bb6a
...
@@ -38,6 +38,11 @@ const CLUSTERS_MOCK_DATA = {
...
@@ -38,6 +38,11 @@ const CLUSTERS_MOCK_DATA = {
status
:
APPLICATION_STATUS
.
INSTALLING
,
status
:
APPLICATION_STATUS
.
INSTALLING
,
status_reason
:
'
Cannot connect
'
,
status_reason
:
'
Cannot connect
'
,
},
},
{
name
:
'
cert_manager
'
,
status
:
APPLICATION_STATUS
.
ERROR
,
status_reason
:
'
Cannot connect
'
,
}
],
],
},
},
},
},
...
@@ -77,6 +82,11 @@ const CLUSTERS_MOCK_DATA = {
...
@@ -77,6 +82,11 @@ const CLUSTERS_MOCK_DATA = {
status
:
APPLICATION_STATUS
.
INSTALLABLE
,
status
:
APPLICATION_STATUS
.
INSTALLABLE
,
status_reason
:
'
Cannot connect
'
,
status_reason
:
'
Cannot connect
'
,
},
},
{
name
:
'
cert_manager
'
,
status
:
APPLICATION_STATUS
.
ERROR
,
status_reason
:
'
Cannot connect
'
,
}
],
],
},
},
},
},
...
@@ -84,6 +94,7 @@ const CLUSTERS_MOCK_DATA = {
...
@@ -84,6 +94,7 @@ const CLUSTERS_MOCK_DATA = {
POST
:
{
POST
:
{
'
/gitlab-org/gitlab-shell/clusters/1/applications/helm
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/helm
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/ingress
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/ingress
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/cert_manager
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/runner
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/runner
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/prometheus
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/prometheus
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/jupyter
'
:
{},
'
/gitlab-org/gitlab-shell/clusters/1/applications/jupyter
'
:
{},
...
...
spec/javascripts/clusters/stores/clusters_store_spec.js
View file @
6196bb6a
...
@@ -108,6 +108,13 @@ describe('Clusters Store', () => {
...
@@ -108,6 +108,13 @@ describe('Clusters Store', () => {
requestReason
:
null
,
requestReason
:
null
,
hostname
:
null
,
hostname
:
null
,
},
},
cert_manager
:
{
title
:
'
Cert-Manager
'
,
status
:
mockResponseData
.
applications
[
6
].
status
,
statusReason
:
mockResponseData
.
applications
[
6
].
status_reason
,
requestStatus
:
null
,
requestReason
:
null
,
},
},
},
});
});
});
});
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
6196bb6a
...
@@ -19,6 +19,7 @@ describe Gitlab::UsageData do
...
@@ -19,6 +19,7 @@ describe Gitlab::UsageData do
create
(
:cluster
,
:provided_by_user
,
:disabled
)
create
(
:cluster
,
:provided_by_user
,
:disabled
)
create
(
:clusters_applications_helm
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_helm
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_ingress
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_ingress
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_cert_managers
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_prometheus
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_prometheus
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_runner
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_runner
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_knative
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_knative
,
:installed
,
cluster:
gcp_cluster
)
...
@@ -81,6 +82,7 @@ describe Gitlab::UsageData do
...
@@ -81,6 +82,7 @@ describe Gitlab::UsageData do
clusters_platforms_user
clusters_platforms_user
clusters_applications_helm
clusters_applications_helm
clusters_applications_ingress
clusters_applications_ingress
clusters_applications_cert_managers
clusters_applications_prometheus
clusters_applications_prometheus
clusters_applications_runner
clusters_applications_runner
clusters_applications_knative
clusters_applications_knative
...
@@ -131,6 +133,7 @@ describe Gitlab::UsageData do
...
@@ -131,6 +133,7 @@ describe Gitlab::UsageData do
expect
(
count_data
[
:clusters_platforms_user
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_platforms_user
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_helm
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_helm
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_ingress
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_ingress
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_cert_managers
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_prometheus
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_prometheus
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_runner
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_runner
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_knative
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_knative
]).
to
eq
(
1
)
...
...
spec/models/clusters/cluster_spec.rb
View file @
6196bb6a
...
@@ -311,13 +311,14 @@ describe Clusters::Cluster do
...
@@ -311,13 +311,14 @@ describe Clusters::Cluster do
context
'when applications are created'
do
context
'when applications are created'
do
let!
(
:helm
)
{
create
(
:clusters_applications_helm
,
cluster:
cluster
)
}
let!
(
:helm
)
{
create
(
:clusters_applications_helm
,
cluster:
cluster
)
}
let!
(
:ingress
)
{
create
(
:clusters_applications_ingress
,
cluster:
cluster
)
}
let!
(
:ingress
)
{
create
(
:clusters_applications_ingress
,
cluster:
cluster
)
}
let!
(
:cert_manager
)
{
create
(
:clusters_applications_cert_managers
,
cluster:
cluster
)
}
let!
(
:prometheus
)
{
create
(
:clusters_applications_prometheus
,
cluster:
cluster
)
}
let!
(
:prometheus
)
{
create
(
:clusters_applications_prometheus
,
cluster:
cluster
)
}
let!
(
:runner
)
{
create
(
:clusters_applications_runner
,
cluster:
cluster
)
}
let!
(
:runner
)
{
create
(
:clusters_applications_runner
,
cluster:
cluster
)
}
let!
(
:jupyter
)
{
create
(
:clusters_applications_jupyter
,
cluster:
cluster
)
}
let!
(
:jupyter
)
{
create
(
:clusters_applications_jupyter
,
cluster:
cluster
)
}
let!
(
:knative
)
{
create
(
:clusters_applications_knative
,
cluster:
cluster
)
}
let!
(
:knative
)
{
create
(
:clusters_applications_knative
,
cluster:
cluster
)
}
it
'returns a list of created applications'
do
it
'returns a list of created applications'
do
is_expected
.
to
contain_exactly
(
helm
,
ingress
,
prometheus
,
runner
,
jupyter
,
knative
)
is_expected
.
to
contain_exactly
(
helm
,
ingress
,
cert_manager
,
prometheus
,
runner
,
jupyter
,
knative
)
end
end
end
end
end
end
...
...
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