mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
test: add test to check expected webhooks are created (#5330)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
217d77d670
commit
7eeb23d1a9
4 changed files with 51 additions and 0 deletions
|
@ -22,6 +22,8 @@ testDirs:
|
||||||
# Report tests
|
# Report tests
|
||||||
- ./test/conformance/kuttl/reports/admission
|
- ./test/conformance/kuttl/reports/admission
|
||||||
- ./test/conformance/kuttl/reports/background
|
- ./test/conformance/kuttl/reports/background
|
||||||
|
# Webhooks
|
||||||
|
- ./test/conformance/kuttl/webhooks
|
||||||
startKIND: false
|
startKIND: false
|
||||||
# timeout: 15
|
# timeout: 15
|
||||||
parallel: 1
|
parallel: 1
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: kuttl.dev/v1beta1
|
||||||
|
kind: TestStep
|
||||||
|
assert:
|
||||||
|
- webhooks.yaml
|
11
test/conformance/kuttl/webhooks/expected-webhooks/README.md
Normal file
11
test/conformance/kuttl/webhooks/expected-webhooks/README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This test verifies expected webhooks are created.
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
1. - Assert webhook `kyverno-policy-validating-webhook-cfg` exists
|
||||||
|
- Assert webhook `kyverno-resource-validating-webhook-cfg` exists
|
||||||
|
- Assert webhook `kyverno-policy-mutating-webhook-cfg` exists
|
||||||
|
- Assert webhook `kyverno-resource-mutating-webhook-cfg` exists
|
||||||
|
- Assert webhook `kyverno-verify-mutating-webhook-cfg` exists
|
|
@ -0,0 +1,34 @@
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
webhook.kyverno.io/managed-by: kyverno
|
||||||
|
name: kyverno-policy-validating-webhook-cfg
|
||||||
|
---
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
webhook.kyverno.io/managed-by: kyverno
|
||||||
|
name: kyverno-resource-validating-webhook-cfg
|
||||||
|
---
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: MutatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
webhook.kyverno.io/managed-by: kyverno
|
||||||
|
name: kyverno-policy-mutating-webhook-cfg
|
||||||
|
---
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: MutatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
webhook.kyverno.io/managed-by: kyverno
|
||||||
|
name: kyverno-resource-mutating-webhook-cfg
|
||||||
|
---
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: MutatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
webhook.kyverno.io/managed-by: kyverno
|
||||||
|
name: kyverno-verify-mutating-webhook-cfg
|
Loading…
Add table
Reference in a new issue