Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system-charts
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rancher商店
system-charts
Commits
9942ab9d
Commit
9942ab9d
authored
May 24, 2019
by
Guangbo Chen
Committed by
Craig Jellick
May 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add istio helm unittest
parent
4bd1f8a5
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
524 additions
and
0 deletions
+524
-0
deployment_test.yaml
...o/1.1.5-rancher1/charts/galley/tests/deployment_test.yaml
+29
-0
rbac_test.yaml
...r-istio/1.1.5-rancher1/charts/galley/tests/rbac_test.yaml
+23
-0
deployment_test.yaml
...1.1.5-rancher1/charts/gateways/tests/deployment_test.yaml
+55
-0
deployment_test.yaml
.../1.1.5-rancher1/charts/grafana/tests/deployment_test.yaml
+25
-0
deployment_test.yaml
...io/1.1.5-rancher1/charts/kiali/tests/deployment_test.yaml
+25
-0
deployment_test.yaml
...io/1.1.5-rancher1/charts/mixer/tests/deployment_test.yaml
+57
-0
deployment_test.yaml
...io/1.1.5-rancher1/charts/pilot/tests/deployment_test.yaml
+63
-0
deployment_test.yaml
...1.5-rancher1/charts/prometheus/tests/deployment_test.yaml
+25
-0
deployment_test.yaml
...1.1.5-rancher1/charts/security/tests/deployment_test.yaml
+25
-0
mutatingwebhook_test.yaml
...ts/sidecarInjectorWebhook/tests/mutatingwebhook_test.yaml
+41
-0
rbac_test.yaml
...ncher1/charts/sidecarInjectorWebhook/tests/rbac_test.yaml
+24
-0
jaeger_test.yaml
...stio/1.1.5-rancher1/charts/tracing/tests/jaeger_test.yaml
+38
-0
zipkin_test.yaml
...stio/1.1.5-rancher1/charts/tracing/tests/zipkin_test.yaml
+37
-0
crd_certmanager_test.yaml
...cher-istio/1.1.5-rancher1/tests/crd_certmanager_test.yaml
+30
-0
crd_test.yaml
charts/rancher-istio/1.1.5-rancher1/tests/crd_test.yaml
+27
-0
No files found.
charts/rancher-istio/1.1.5-rancher1/charts/galley/tests/deployment_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Galley Deployment
templates
:
-
deployment.yaml
tests
:
-
it
:
should pass all kinds of assertion
asserts
:
-
equal
:
path
:
spec.replicas
value
:
1
-
equal
:
path
:
spec.template.spec.containers[0].ports
value
:
-
containerPort
:
443
-
containerPort
:
15014
-
containerPort
:
9901
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
charts/rancher-istio/1.1.5-rancher1/charts/galley/tests/rbac_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Galley RBAC
templates
:
-
clusterrole.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
asserts
:
-
isNotNull
:
path
:
rules
-
isNotEmpty
:
path
:
rules
-
contains
:
path
:
rules
content
:
apiGroups
:
[
"
admissionregistration.k8s.io"
]
resources
:
[
"
validatingwebhookconfigurations"
]
verbs
:
[
"
*"
]
-
isKind
:
of
:
ClusterRole
-
isAPIVersion
:
of
:
rbac.authorization.k8s.io/v1
-
hasDocuments
:
count
:
1
charts/rancher-istio/1.1.5-rancher1/charts/gateways/tests/deployment_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Gateway Deployment
templates
:
-
deployment.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
istio-ingressgateway.enabled
:
true
istio-ilbgateway.enabled
:
false
istio-egressgateway.enabled
:
false
istio-ingressgateway.autoscaleEnabled
:
true
asserts
:
-
isNull
:
path
:
spec.replicas
-
contains
:
path
:
spec.template.spec.containers[0].ports
content
:
containerPort
:
80
-
contains
:
path
:
spec.template.spec.containers[0].ports
content
:
containerPort
:
443
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
-
it
:
should deploy 3 gateways
set
:
istio-ingressgateway.enabled
:
true
istio-ilbgateway.enabled
:
true
istio-egressgateway.enabled
:
true
asserts
:
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
3
-
it
:
should not deploy gateways
set
:
istio-ingressgateway.enabled
:
false
istio-ilbgateway.enabled
:
false
istio-egressgateway.enabled
:
false
asserts
:
-
hasDocuments
:
count
:
0
charts/rancher-istio/1.1.5-rancher1/charts/grafana/tests/deployment_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Istio Grafana Deployment
templates
:
-
deployment.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
replicaCount
:
1
asserts
:
-
equal
:
path
:
spec.replicas
value
:
1
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
charts/rancher-istio/1.1.5-rancher1/charts/kiali/tests/deployment_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Istio Kiali Deployment
templates
:
-
deployment.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
replicaCount
:
1
asserts
:
-
equal
:
path
:
spec.replicas
value
:
1
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
charts/rancher-istio/1.1.5-rancher1/charts/mixer/tests/deployment_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Istio Mixer Deployment
templates
:
-
deployment.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
policy.enabled
:
true
telemetry.enabled
:
false
asserts
:
-
isNull
:
path
:
spec.replicas
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
-
it
:
should pass all kinds of assertion
set
:
policy.enabled
:
false
telemetry.enabled
:
true
asserts
:
-
isNull
:
path
:
spec.replicas
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
-
it
:
should pass all kinds of assertion
set
:
policy.enabled
:
true
telemetry.enabled
:
true
asserts
:
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
2
charts/rancher-istio/1.1.5-rancher1/charts/pilot/tests/deployment_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Pilot Deployment
templates
:
-
deployment.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
service.internalPort
:
8080
sidecar
:
true
asserts
:
-
equal
:
path
:
spec.template.spec.containers[0].image
value
:
istio/pilot:1.1.5
-
notEqual
:
path
:
spec.template.spec.containers[0].image
value
:
istio/pilot:1.1
-
matchRegex
:
path
:
metadata.name
pattern
:
.*istio-pilot.*
-
contains
:
path
:
spec.template.spec.containers[0].ports
content
:
containerPort
:
8080
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
# sidecar tests
-
equal
:
path
:
spec.template.spec.containers[1].name
value
:
istio-proxy
-
notContains
:
path
:
spec.template.spec.containers[0].ports
content
:
containerPort
:
15011
-
it
:
should not set replicas
set
:
autoscaleEnabled
:
true
asserts
:
-
equal
:
path
:
spec.replicas
value
:
null
-
it
:
should not add sidecar
set
:
sidecar
:
false
asserts
:
-
contains
:
path
:
spec.template.spec.containers[0].ports
content
:
containerPort
:
15011
-
contains
:
path
:
spec.template.spec.containers[0].args
content
:
--secureGrpcAddr
charts/rancher-istio/1.1.5-rancher1/charts/prometheus/tests/deployment_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Istio Prometheus Deployment
templates
:
-
deployment.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
replicaCount
:
1
asserts
:
-
equal
:
path
:
spec.replicas
value
:
1
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
charts/rancher-istio/1.1.5-rancher1/charts/security/tests/deployment_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Istio Citadel Deployment
templates
:
-
deployment.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
replicaCount
:
1
asserts
:
-
equal
:
path
:
spec.replicas
value
:
1
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
charts/rancher-istio/1.1.5-rancher1/charts/sidecarInjectorWebhook/tests/mutatingwebhook_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test SidecarInjectorWebhook MutatingWebhook
templates
:
-
mutatingwebhook.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
enableNamespacesByDefault
:
false
asserts
:
-
isNull
:
path
:
webhooks[0].namespaceSelector.matchExpressions
-
isEmpty
:
path
:
webhooks[0].namespaceSelector.matchExpressions
-
isNotNull
:
path
:
webhooks[0].namespaceSelector.matchLabels
-
isNotEmpty
:
path
:
webhooks[0].namespaceSelector.matchLabels
-
contains
:
path
:
webhooks[0].rules
content
:
operations
:
[
"
CREATE"
]
apiGroups
:
[
"
"
]
apiVersions
:
[
"
v1"
]
resources
:
[
"
pods"
]
-
isKind
:
of
:
MutatingWebhookConfiguration
-
isAPIVersion
:
of
:
admissionregistration.k8s.io/v1beta1
-
hasDocuments
:
count
:
1
-
it
:
should not set autoInjection selector
set
:
enableNamespacesByDefault
:
true
asserts
:
-
isNotNull
:
path
:
webhooks[0].namespaceSelector.matchExpressions
-
isNotEmpty
:
path
:
webhooks[0].namespaceSelector.matchExpressions
-
isNull
:
path
:
webhooks[0].namespaceSelector.matchLabels
-
isEmpty
:
path
:
webhooks[0].namespaceSelector.matchLabels
charts/rancher-istio/1.1.5-rancher1/charts/sidecarInjectorWebhook/tests/rbac_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test SidecarInjectorWebhook RBAC
templates
:
-
clusterrole.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
provider
:
jaeger
asserts
:
-
isNotNull
:
path
:
rules
-
isNotEmpty
:
path
:
rules
-
contains
:
path
:
rules
content
:
apiGroups
:
[
"
admissionregistration.k8s.io"
]
resources
:
[
"
mutatingwebhookconfigurations"
]
verbs
:
[
"
get"
,
"
list"
,
"
watch"
,
"
patch"
]
-
isKind
:
of
:
ClusterRole
-
isAPIVersion
:
of
:
rbac.authorization.k8s.io/v1
-
hasDocuments
:
count
:
1
charts/rancher-istio/1.1.5-rancher1/charts/tracing/tests/jaeger_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Jaeger Deployment
templates
:
-
deployment-jaeger.yaml
-
deployment-zipkin.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
provider
:
jaeger
asserts
:
-
equal
:
path
:
spec.template.spec.containers[0].image
value
:
jaegertracing/all-in-one:1.9
-
equal
:
path
:
spec.template.metadata.labels.app
value
:
jaeger
-
equal
:
path
:
spec.template.spec.containers[0].name
value
:
jaeger
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
-
it
:
should not deploy jaeger
set
:
provider
:
zipkin
asserts
:
-
hasDocuments
:
count
:
0
charts/rancher-istio/1.1.5-rancher1/charts/tracing/tests/zipkin_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Zipkinn Deployment
templates
:
-
deployment-zipkin.yaml
tests
:
-
it
:
should pass all kinds of assertion
set
:
provider
:
zipkin
asserts
:
-
equal
:
path
:
spec.template.spec.containers[0].image
value
:
openzipkin/zipkin:2
-
equal
:
path
:
spec.template.metadata.labels.app
value
:
zipkin
-
equal
:
path
:
spec.template.spec.containers[0].name
value
:
tracing
-
isNull
:
path
:
spec.template.nodeSelector
-
isNotNull
:
path
:
spec.template
-
isNotEmpty
:
path
:
spec.template.spec.containers[0].resources
-
isNotEmpty
:
path
:
spec.template.spec.containers[0]
-
isKind
:
of
:
Deployment
-
isAPIVersion
:
of
:
extensions/v1beta1
-
hasDocuments
:
count
:
1
-
it
:
should not deploy zipkin
set
:
provider
:
jaeger
asserts
:
-
hasDocuments
:
count
:
0
charts/rancher-istio/1.1.5-rancher1/tests/crd_certmanager_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Certmanager CRDs
templates
:
-
crd-certmanager.yaml
tests
:
-
it
:
should create certmanager CRDs
set
:
enableCRDs
:
true
certmanager.enabled
:
true
asserts
:
-
hasDocuments
:
count
:
5
-
isKind
:
of
:
CustomResourceDefinition
-
it
:
should not render certmanager CRDs
set
:
enableCRDs
:
true
certmanager.enabled
:
false
asserts
:
-
hasDocuments
:
count
:
0
-
it
:
should set helm crd hook annotations
set
:
enableCRDs
:
true
certmanager.enabled
:
true
asserts
:
-
equal
:
path
:
metadata.annotations
value
:
helm.sh/resource-policy
:
keep
helm.sh/hook
:
"
crd-install"
charts/rancher-istio/1.1.5-rancher1/tests/crd_test.yaml
0 → 100644
View file @
9942ab9d
suite
:
Test Istio CRDs
templates
:
-
crds.yaml
tests
:
-
it
:
should create custom resource definition
set
:
enableCRDs
:
true
asserts
:
-
hasDocuments
:
count
:
53
#istio v1.1.5 contains total 53 CRDs
-
isKind
:
of
:
CustomResourceDefinition
-
it
:
should not render custom resource definition
set
:
enableCRDs
:
false
asserts
:
-
hasDocuments
:
count
:
0
-
it
:
should set helm crd hook annotations
set
:
enableCRDs
:
true
asserts
:
-
equal
:
path
:
metadata.annotations
value
:
helm.sh/resource-policy
:
keep
helm.sh/hook
:
"
crd-install"
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