Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust waiting for KUDO init in e2e tests #1592

Merged
merged 1 commit into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kudo-e2e-test.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: TestSuite
testDirs:
- ./test/e2e
commands:
- command: ./bin/kubectl-kudo init --unsafe-self-signed-webhook-ca --kudo-image kudobuilder/controller:%version% --kudo-image-pull-policy Never
- command: ./bin/kubectl-kudo init --wait --unsafe-self-signed-webhook-ca --kudo-image kudobuilder/controller:%version% --kudo-image-pull-policy Never
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only actual change.

All other changes are:

  • Remove the 00-assert.yaml from all e2e-tests (which ensured that KUDO manager was running)
  • Move all other test files one number up ( which git didn't recognise correctly, therefore the many diffs :( )

startKIND: true
kindContainers:
- kudobuilder/controller:%version%
Expand Down
18 changes: 11 additions & 7 deletions test/e2e/cli-install-uninstall/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
apiVersion: v1
kind: Pod
apiVersion: kudo.dev/v1beta1
kind: Instance
metadata:
labels:
app: kudo-manager
control-plane: controller-manager
namespace: kudo-system
name: first-operator
status:
phase: Running
planStatus:
deploy:
status: COMPLETE
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
16 changes: 3 additions & 13 deletions test/e2e/cli-install-uninstall/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
apiVersion: kudo.dev/v1beta1
kind: Instance
metadata:
name: first-operator
status:
planStatus:
deploy:
status: COMPLETE
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
apiVersion: v1
kind: Event
message: 'Execution of plan cleanup finished with status COMPLETE'
3 changes: 0 additions & 3 deletions test/e2e/cli-install-uninstall/03-assert.yaml

This file was deleted.

29 changes: 22 additions & 7 deletions test/e2e/dependencies-hash/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
apiVersion: v1
kind: Pod
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: kudo-manager
control-plane: controller-manager
namespace: kudo-system
name: nginx-deployment
spec:
replicas: 2
template:
metadata:
annotations:
kudo.dev/dependencies-hash: 6fa812afe527bdb6c9a5fbfcba8193bb
kudo.dev/operator-version: 0.1.0
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
---
apiVersion: kudo.dev/v1beta1
kind: Instance
status:
phase: Running
planStatus:
deploy:
status: COMPLETE
5 changes: 3 additions & 2 deletions test/e2e/dependencies-hash/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
replicas: 3
template:
metadata:
annotations:
# This update to the deployment must have the same hash as 00-assert.yaml
kudo.dev/dependencies-hash: 6fa812afe527bdb6c9a5fbfcba8193bb
kudo.dev/operator-version: 0.1.0
spec:
Expand All @@ -20,5 +21,5 @@ apiVersion: kudo.dev/v1beta1
kind: Instance
status:
planStatus:
deploy:
update-replica:
status: COMPLETE
24 changes: 6 additions & 18 deletions test/e2e/dependencies-hash/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
apiVersion: apps/v1
kind: Deployment
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-deployment
spec:
replicas: 3
template:
metadata:
annotations:
# This update to the deployment must have the same hash as 00-assert.yaml
kudo.dev/dependencies-hash: 6fa812afe527bdb6c9a5fbfcba8193bb
kudo.dev/operator-version: 0.1.0
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
name: configdata
data:
valueA: ChangedValue
---
apiVersion: kudo.dev/v1beta1
kind: Instance
status:
planStatus:
update-replica:
update-param:
status: COMPLETE
27 changes: 20 additions & 7 deletions test/e2e/dependencies-hash/03-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
apiVersion: v1
kind: ConfigMap
apiVersion: apps/v1
kind: Deployment
metadata:
name: configdata
data:
valueA: ChangedValue
name: nginx-deployment
spec:
replicas: 2
template:
metadata:
annotations:
# After the second update to replicas the hash should change, based on the last deployed version of the config map
kudo.dev/dependencies-hash: da9f56a62d3c4af2596bebace008d845
kudo.dev/operator-version: 0.1.0
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
---
apiVersion: kudo.dev/v1beta1
kind: Instance
status:
# We need to check for IN_PROGRESS here and for COMPLETE in the next step, as update-replica ran before and is still set to COMPLETE from the last run
planStatus:
update-param:
status: COMPLETE
update-replica:
status: IN_PROGRESS
22 changes: 1 addition & 21 deletions test/e2e/dependencies-hash/04-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
template:
metadata:
annotations:
# After the second update to replicas the hash should change, based on the last deployed version of the config map
kudo.dev/dependencies-hash: da9f56a62d3c4af2596bebace008d845
kudo.dev/operator-version: 0.1.0
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
---
apiVersion: kudo.dev/v1beta1
kind: Instance
status:
# We need to check for IN_PROGRESS here and for COMPLETE in the next step, as update-replica ran before and is still set to COMPLETE from the last run
planStatus:
update-replica:
status: IN_PROGRESS
status: COMPLETE
21 changes: 20 additions & 1 deletion test/e2e/dependencies-hash/05-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
template:
metadata:
annotations:
# After this config map update the hash should change, as the deployment was applied as well
kudo.dev/dependencies-hash: 1510654b540619228b477bdd56d44175
kudo.dev/operator-version: 0.1.0
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
---
apiVersion: kudo.dev/v1beta1
kind: Instance
status:
planStatus:
update-replica:
deploy:
status: COMPLETE
25 changes: 0 additions & 25 deletions test/e2e/dependencies-hash/06-assert.yaml

This file was deleted.

15 changes: 9 additions & 6 deletions test/e2e/plan-trigger/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
apiVersion: v1
kind: Pod
apiVersion: kudo.dev/v1beta1
kind: Instance
metadata:
labels:
app: kudo-manager
control-plane: controller-manager
namespace: kudo-system
kudo.dev/operator: feature-operator
spec:
operatorVersion:
name: feature-operator-0.1.0
status:
phase: Running
planStatus:
deploy:
status: COMPLETE
9 changes: 9 additions & 0 deletions test/e2e/plan-trigger/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ status:
planStatus:
deploy:
status: COMPLETE
custom:
status: COMPLETE
---
apiVersion: v1
kind: ConfigMap
metadata:
name: feature-operator-cm
data:
foo: "1234"
21 changes: 0 additions & 21 deletions test/e2e/plan-trigger/02-assert.yaml

This file was deleted.

15 changes: 9 additions & 6 deletions test/e2e/terminal-failed-job/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
apiVersion: v1
kind: Pod
apiVersion: kudo.dev/v1beta1
kind: Instance
metadata:
labels:
app: kudo-manager
control-plane: controller-manager
namespace: kudo-system
kudo.dev/operator: failjob-operator
spec:
operatorVersion:
name: failjob-operator-0.1.0
status:
phase: Running
planStatus:
deploy:
status: FATAL_ERROR
6 changes: 3 additions & 3 deletions test/e2e/terminal-failed-job/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apiVersion: kudo.dev/v1beta1
kind: Instance
metadata:
labels:
kudo.dev/operator: failjob-operator
kudo.dev/operator: job-timeout-operator
spec:
operatorVersion:
name: failjob-operator-0.1.0
name: job-timeout-operator-0.1.0
status:
planStatus:
deploy:
status: FATAL_ERROR
status: FATAL_ERROR
12 changes: 0 additions & 12 deletions test/e2e/terminal-failed-job/02-assert.yaml

This file was deleted.

22 changes: 16 additions & 6 deletions test/e2e/toggle-task/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
apiVersion: v1
kind: Pod
apiVersion: kudo.dev/v1beta1
kind: Instance
metadata:
labels:
app: kudo-manager
control-plane: controller-manager
namespace: kudo-system
kudo.dev/operator: feature-operator
spec:
operatorVersion:
name: feature-operator-0.1.0
status:
phase: Running
planStatus:
deploy:
status: COMPLETE
---
apiVersion: v1
kind: ConfigMap
metadata:
name: feature-operator-cm
data:
foo: "1234"
Loading