Skip to content

Commit

Permalink
Merge pull request #24 from zifter/feature/use-unit-tests
Browse files Browse the repository at this point in the history
Use unittest plugin
  • Loading branch information
zifter authored Sep 16, 2021
2 parents 4e20641 + 7e51a79 commit 7c33dcf
Show file tree
Hide file tree
Showing 74 changed files with 1,096 additions and 489 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/github-chart-testing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Run Helm Test Cases
on: pull_request
jobs:
Helm-Template-All:
Helm-Run-Tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
Expand All @@ -10,7 +10,9 @@ jobs:
- name: Run Tests
uses: WyriHaximus/github-action-helm3@v2
with:
exec: ${{ github.workspace }}/dev/run-tests.sh
exec: |-
helm plugin install https://github.com/quintush/helm-unittest &&
/github/workspace/dev/run-tests.sh
Helm-Lint:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ Install [https://github.com/karuppiah7890/helm-schema-gen](helm-schema-gen) spec
helm plugin install https://github.com/karuppiah7890/helm-schema-gen.git
```

#### Install helm-unittest
Install [https://github.com/quintush/helm-unittest](helm-unittest) special plugin to test helm

```bash
helm plugin install https://github.com/quintush/helm-unittest
```

### Launching test cluster with all dependencies
```bash
./dev/cluster/run.sh
Expand Down
2 changes: 1 addition & 1 deletion charts/agones-dashboards/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: agones-dashboards
description: A Helm chart of agones dashboards. Provide grafana dashboards.
type: application
version: 1.16.1
version: 1.16.2
appVersion: "1.16.0"
icon: https://artifacthub.io/static/media/placeholder_pkg_helm.png
home: https://github.com/googleforgames/agones
Expand Down
8 changes: 8 additions & 0 deletions charts/agones-dashboards/tests/dashboards_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
suite: test dashboards
templates:
- dashboards.yaml
tests:
- it: render by default
asserts:
- hasDocuments:
count: 1
12 changes: 0 additions & 12 deletions charts/agones-dashboards/tests/template-all/run.sh

This file was deleted.

This file was deleted.

103 changes: 9 additions & 94 deletions charts/agones-dashboards/tests/template-all/values-full.yaml
Original file line number Diff line number Diff line change
@@ -1,99 +1,14 @@
replicaCount: 1

image:
repository: zifter/zookeeper_exporter
pullPolicy: IfNotPresent
tag: "latest"

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
create: true
annotations: {}
name: ""

podAnnotations: {}

podSecurityContext:
fsGroup: 2000

securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000

service:
type: ClusterIP
port: 80

ingress:
enabled: false
className: ""
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: chart-example-tls
hosts:
- chart-example.local

resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

# Prometheus rules
rules:
enabled: true

# Grafana dashboards
dashboards:
enabled: true
# Labels to add dashboard
labels:
# default grafana dashboard discovery label with stub value
# Override this value if you use custom grafana label
# https://github.com/grafana/helm-charts/blob/grafana-6.16.3/charts/grafana/values.yaml#L629
grafana_dashboard: '1'
# Folder to put dashboard in grafana
# Will be used default if it's empty
targetFolder: ""

# Prometheus service monitor
metrics:
enabled: true
# Interval between metrics scraping
interval: 1m

# Kafka clusters to export metrics
zookeeper:
- name: cluster1
# list of hosts of cluster to monitor
hosts:
- host1:2181
- host2:2181
- name: cluster2
# list of hosts of cluster to monitor
hosts:
- host1:2181
- host2:2181
- host2:2181
# Labels to add dashboard
labels:
# default grafana dashboard discovery label with stub value
# Override this value if you use custom grafana label
# https://github.com/grafana/helm-charts/blob/grafana-6.16.3/charts/grafana/values.yaml#L629
grafana_dashboard: '1'
# Folder to put dashboard in grafana
# Will be used default if it's empty
targetFolder: ""
Loading

0 comments on commit 7c33dcf

Please sign in to comment.