Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eingang-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
eingang-manager
Commits
56e3ce1b
Commit
56e3ce1b
authored
1 year ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-3328 cleanup helm unittests and add tests to cover each line
parent
f99c5f45
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/helm/service_monitor_test.yaml
+26
-6
26 additions, 6 deletions
src/test/helm/service_monitor_test.yaml
src/test/helm/service_test.yaml
+25
-3
25 additions, 3 deletions
src/test/helm/service_test.yaml
with
51 additions
and
9 deletions
src/test/helm/service_monitor_test.yaml
+
26
−
6
View file @
56e3ce1b
...
...
@@ -22,26 +22,48 @@
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
suite
:
test
deployment
suite
:
test
service monitor
release
:
name
:
afm-adapter
namespace
:
sh-helm-test
templates
:
-
templates/service_monitor.yaml
tests
:
-
it
:
should have the label component with value afm-adapter-service-monitor attached
-
it
:
should have
basic info and
the label component with value afm-adapter-service-monitor attached
asserts
:
-
isKind
:
of
:
ServiceMonitor
-
isAPIVersion
:
of
:
monitoring.coreos.com/v1
-
equal
:
path
:
metadata.name
value
:
afm-adapter
-
equal
:
path
:
metadata.namespace
value
:
sh-helm-test
-
equal
:
path
:
metadata.labels["component"]
value
:
afm-adapter-service-monitor
-
it
:
should contain default lables and component lables
asserts
:
-
equal
:
path
:
metadata.labels
value
:
app.kubernetes.io/instance
:
afm-adapter
app.kubernetes.io/managed-by
:
Helm
app.kubernetes.io/name
:
afm-adapter
app.kubernetes.io/namespace
:
sh-helm-test
app.kubernetes.io/part-of
:
ozgcloud
app.kubernetes.io/version
:
0.0.0-MANAGED-BY-JENKINS
component
:
afm-adapter-service-monitor
helm.sh/chart
:
Intelliform-Adapter-0.0.0-MANAGED-BY-JENKINS
ozg-component
:
eingangsadapter
-
it
:
should have the metrics endpoint configured by default
set
:
env.springProfiles
:
oc,stage
asserts
:
-
isKind
:
of
:
ServiceMonitor
-
contains
:
path
:
spec.endpoints
content
:
...
...
@@ -49,8 +71,6 @@ tests:
path
:
/actuator/prometheus
-
it
:
should be able to enable the endpoint
asserts
:
-
isKind
:
of
:
ServiceMonitor
-
contains
:
path
:
spec.endpoints
content
:
...
...
This diff is collapsed.
Click to expand it.
src/test/helm/service_test.yaml
+
25
−
3
View file @
56e3ce1b
...
...
@@ -22,20 +22,28 @@
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
suite
:
test
deployment
suite
:
test
service
release
:
name
:
afm-adapter
namespace
:
sh-helm-test
templates
:
-
templates/service.yaml
tests
:
-
it
:
should have the label component with value afm-adapter-service attached
-
it
:
should have
basics and
the label component with value afm-adapter-service attached
asserts
:
-
isKind
:
of
:
Service
-
isAPIVersion
:
of
:
v1
-
equal
:
path
:
metadata.labels["component"]
value
:
afm-adapter-service
-
equal
:
path
:
metadata.name
value
:
afm-adapter
-
equal
:
path
:
metadata.namespace
value
:
sh-helm-test
-
it
:
should be of type ClusterIP
asserts
:
-
equal
:
...
...
@@ -76,3 +84,17 @@ tests:
path
:
spec.selector["app.kubernetes.io/namespace"]
value
:
sh-helm-test
-
it
:
should contain default lables and component lables
asserts
:
-
equal
:
path
:
metadata.labels
value
:
app.kubernetes.io/instance
:
afm-adapter
app.kubernetes.io/managed-by
:
Helm
app.kubernetes.io/name
:
afm-adapter
app.kubernetes.io/namespace
:
sh-helm-test
app.kubernetes.io/part-of
:
ozgcloud
app.kubernetes.io/version
:
0.0.0-MANAGED-BY-JENKINS
component
:
afm-adapter-service
helm.sh/chart
:
Intelliform-Adapter-0.0.0-MANAGED-BY-JENKINS
ozg-component
:
eingangsadapter
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment