mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +01:00
8
.github/workflows/helm.yaml
vendored
8
.github/workflows/helm.yaml
vendored
@@ -42,6 +42,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: v3.7.0
|
version: v3.7.0
|
||||||
|
|
||||||
|
- name: Install Helm Unit Test Plugin
|
||||||
|
run: |
|
||||||
|
helm plugin install https://github.com/helm-unittest/helm-unittest
|
||||||
|
|
||||||
|
- name: Run Helm Unit Tests
|
||||||
|
run: |
|
||||||
|
helm unittest charts/descheduler --strict -d
|
||||||
|
|
||||||
- name: Run chart-testing (list-changed)
|
- name: Run chart-testing (list-changed)
|
||||||
id: list-changed
|
id: list-changed
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
1
charts/descheduler/tests/.gitignore
vendored
Normal file
1
charts/descheduler/tests/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
__snapshot__
|
||||||
17
charts/descheduler/tests/cronjob_test.yaml
Normal file
17
charts/descheduler/tests/cronjob_test.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
suite: Test Descheduler CronJob
|
||||||
|
|
||||||
|
templates:
|
||||||
|
- "*.yaml"
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: descheduler
|
||||||
|
|
||||||
|
set:
|
||||||
|
kind: CronJob
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- it: creates CronJob when kind is set
|
||||||
|
template: templates/cronjob.yaml
|
||||||
|
asserts:
|
||||||
|
- isKind:
|
||||||
|
of: CronJob
|
||||||
49
charts/descheduler/tests/deployment_test.yaml
Normal file
49
charts/descheduler/tests/deployment_test.yaml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
suite: Test Descheduler Deployment
|
||||||
|
|
||||||
|
templates:
|
||||||
|
- "*.yaml"
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: descheduler
|
||||||
|
|
||||||
|
set:
|
||||||
|
kind: Deployment
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- it: creates Deployment when kind is set
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
asserts:
|
||||||
|
- isKind:
|
||||||
|
of: Deployment
|
||||||
|
|
||||||
|
- it: enables leader-election
|
||||||
|
set:
|
||||||
|
leaderElection:
|
||||||
|
enabled: true
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
asserts:
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].args
|
||||||
|
content: --leader-elect=true
|
||||||
|
|
||||||
|
- it: support leader-election resourceNamespace
|
||||||
|
set:
|
||||||
|
leaderElection:
|
||||||
|
enabled: true
|
||||||
|
resourceNamespace: test
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
asserts:
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].args
|
||||||
|
content: --leader-elect-resource-namespace=test
|
||||||
|
|
||||||
|
- it: support legacy leader-election resourceNamescape
|
||||||
|
set:
|
||||||
|
leaderElection:
|
||||||
|
enabled: true
|
||||||
|
resourceNamescape: typo
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
asserts:
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].args
|
||||||
|
content: --leader-elect-resource-namespace=typo
|
||||||
Reference in New Issue
Block a user