Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <[email protected]>
  • Loading branch information
odubajDT committed Feb 29, 2024
1 parent 09122f9 commit 92c7c00
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ status:
currentPhase: AppDeploy
postDeploymentEvaluationStatus: Pending
postDeploymentStatus: Pending
preDeploymentEvaluationStatus: Unknown
preDeploymentEvaluationStatus: Succeeded
preDeploymentStatus: Succeeded
status: Progressing
workloadOverallStatus: Progressing
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: lifecycle.keptn.sh/v1beta1
kind: KeptnAppVersion
metadata:
name: podtato-head-1.3-6b86b273
status:
currentPhase: AppDeploy
postDeploymentEvaluationStatus: Pending
postDeploymentStatus: Pending
preDeploymentEvaluationStatus: Succeeded
preDeploymentStatus: Succeeded
status: Progressing
workloadOverallStatus: Progressing
---
apiVersion: lifecycle.keptn.sh/v1beta1
kind: KeptnWorkloadVersion
metadata:
name: podtato-head-podtato-head-entry-0.1.0
status:
currentPhase: WorkloadPreDeployTasks
deploymentStatus: Pending
preDeploymentEvaluationStatus: Pending
preDeploymentStatus: Pending
status: Progressing
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-entry
labels:
app: podtato-head
spec:
selector:
matchLabels:
component: podtato-head-entry
template:
metadata:
labels:
component: podtato-head-entry
annotations:
keptn.sh/app: podtato-head
keptn.sh/workload: podtato-head-entry
keptn.sh/version: 0.1.0
keptn.sh/pre-deployment-tasks: missing-task
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: ghcr.io/podtato-head/entry:0.2.8
imagePullPolicy: Always
ports:
- containerPort: 9000
env:
- name: PODTATO_PORT
value: "9000"
---
apiVersion: v1
kind: Service
metadata:
name: podtato-head-entry
labels:
app: podtato-head
spec:
selector:
component: podtato-head-entry
ports:
- name: http
port: 9000
protocol: TCP
targetPort: 9000
type: LoadBalancer
# change to NodePort if no LoadBalancer controller is available
# type: NodePort
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: workload-version-missing-task
spec:
namespaceTemplate:
metadata:
annotations:
keptn.sh/lifecycle-toolkit: enabled
steps:
- name: step-00
try:
- apply:
file: 00-install.yaml
- assert:
file: 00-assert.yaml

0 comments on commit 92c7c00

Please sign in to comment.