Skip to content

Commit

Permalink
add more lifecycle related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maskarb committed Nov 3, 2023
1 parent 3a914df commit 24f77f7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/kuttl/test-lifecycle-hook/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,37 @@ spec:
port: 8000
scheme: HTTP
terminationGracePeriodSeconds: 500
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: lifecycle-processor-no-termination-period
namespace: test-lifecycle-hook
spec:
template:
spec:
serviceAccountName: lifecycle-processor-no-termination-period
containers:
- name: lifecycle-processor-no-termination-period
image: quay.io/psav/clowder-hello
lifecycle:
preStop:
httpGet:
path: /healthz
port: 8000
scheme: HTTP
terminationGracePeriodSeconds: 30
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: lifecycle-processor-only-termination-period
namespace: test-lifecycle-hook
spec:
template:
spec:
serviceAccountName: lifecycle-processor-only-termination-period
containers:
- name: lifecycle-processor-only-termination-period
image: quay.io/psav/clowder-hello
terminationGracePeriodSeconds: 29
12 changes: 12 additions & 0 deletions tests/kuttl/test-lifecycle-hook/01-pods.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,15 @@ spec:
port: 8000
path: /healthz
terminationGracePeriodSeconds: 500
- name: processor-no-termination-period
podSpec:
image: quay.io/psav/clowder-hello
lifecycle:
preStop:
httpGet:
port: 8000
path: /healthz
- name: processor-only-termination-period
podSpec:
image: quay.io/psav/clowder-hello
terminationGracePeriodSeconds: 29

0 comments on commit 24f77f7

Please sign in to comment.