-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test for apply-delete-apply bug
Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
- Loading branch information
Showing
6 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: Instance | ||
metadata: | ||
name: crd-instance | ||
spec: | ||
operatorVersion: | ||
name: crd-operator-0.1.0 | ||
status: | ||
planStatus: | ||
deploy: | ||
status: COMPLETE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# this is a test covering regression described in #1596 | ||
# there was a race in apply-delete-apply where cache was not invalidated between delete and second apply | ||
# as a result configmap did not exist at the end of plan | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: kubectl kudo install --instance configmap-instance ./operator | ||
namespaced: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: ConfigMap | ||
metadata: | ||
name: test-configmap | ||
data: | ||
foo: bar |
42 changes: 42 additions & 0 deletions
42
test/integration/apply-delete-apply/operator/operator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
name: "test-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: apply | ||
kind: Apply | ||
spec: | ||
resources: | ||
- configmap.yaml | ||
- name: delete | ||
kind: Delete | ||
spec: | ||
resources: | ||
- configmap.yaml | ||
plans: | ||
deploy: | ||
strategy: serial | ||
phases: | ||
- name: main | ||
strategy: serial | ||
steps: | ||
- name: apply | ||
tasks: | ||
- apply | ||
- name: delete | ||
strategy: serial | ||
steps: | ||
- name: delete | ||
tasks: | ||
- delete | ||
- name: apply | ||
strategy: serial | ||
steps: | ||
- name: apply | ||
tasks: | ||
- apply |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
parameters: | ||
- name: replicas | ||
description: Number of replicas that should be run as part of the deployment | ||
default: 2 |
6 changes: 6 additions & 0 deletions
6
test/integration/apply-delete-apply/operator/templates/configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: test-configmap | ||
data: | ||
foo: bar |