Skip to content

Commit

Permalink
Add an e2e test for kudo plan trigger command (#1576)
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
  • Loading branch information
Aleksey Dukhovniy committed Jul 3, 2020
1 parent e4ccca9 commit 8979d92
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/e2e/plan-trigger/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Pod
metadata:
labels:
app: kudo-manager
control-plane: controller-manager
namespace: kudo-system
status:
phase: Running
12 changes: 12 additions & 0 deletions test/e2e/plan-trigger/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: kudo.dev/v1beta1
kind: Instance
metadata:
labels:
kudo.dev/operator: feature-operator
spec:
operatorVersion:
name: feature-operator-0.1.0
status:
planStatus:
deploy:
status: COMPLETE
5 changes: 5 additions & 0 deletions test/e2e/plan-trigger/01-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kudo.dev/v1beta1
kind: TestStep
commands:
- command: kubectl kudo install --instance feature-operator-instance ./feature-operator
namespaced: true
21 changes: 21 additions & 0 deletions test/e2e/plan-trigger/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: kudo.dev/v1beta1
kind: Instance
metadata:
labels:
kudo.dev/operator: feature-operator
spec:
operatorVersion:
name: feature-operator-0.1.0
status:
planStatus:
deploy:
status: COMPLETE
custom:
status: COMPLETE
---
apiVersion: v1
kind: ConfigMap
metadata:
name: feature-operator-cm
data:
foo: "1234"
5 changes: 5 additions & 0 deletions test/e2e/plan-trigger/02-trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kudo.dev/v1beta1
kind: TestStep
commands:
- command: kubectl kudo plan trigger --instance feature-operator-instance --name custom
namespaced: true
39 changes: 39 additions & 0 deletions test/e2e/plan-trigger/feature-operator/operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: kudo.dev/v1beta1
name: "feature-operator"
operatorVersion: "0.1.0"
appVersion: "1.7.9"
kubernetesVersion: 1.13.0
maintainers:
- name: Your name
email: <your@email.com>
url: https://kudo.dev
tasks:
- name: deploy
kind: Dummy
spec:
done: true
wantErr: false
- name: cm
kind: Apply
spec:
resources:
- configmap.yaml
plans:
deploy:
strategy: serial
phases:
- name: main
strategy: parallel
steps:
- name: everything
tasks:
- deploy
custom:
strategy: serial
phases:
- name: main
strategy: parallel
steps:
- name: everything
tasks:
- cm
2 changes: 2 additions & 0 deletions test/e2e/plan-trigger/feature-operator/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apiVersion: kudo.dev/v1beta1
parameters:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: feature-operator-cm
namespace: {{ .Namespace }}
data:
foo: "1234"

0 comments on commit 8979d92

Please sign in to comment.