-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: adjust e2e test for custom configuration
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
- Loading branch information
Dominik Rosiek
committed
Jul 3, 2023
1 parent
2128e75
commit cbde34e
Showing
25 changed files
with
177 additions
and
19 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
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
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
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
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
14 changes: 14 additions & 0 deletions
14
tests/modified/operator/daemonset-with-annotations/00-assert.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,14 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: daemonset-with-annotations | ||
status: | ||
numberReady: 1 | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- selector: app=daemonset-with-annotations | ||
commands: | ||
- script: "[ $(kubectl logs -l app=daemonset-with-annotations -c tailing-sidecar-0 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" | ||
- script: "[ $(kubectl logs -l app=daemonset-with-annotations -c tailing-sidecar-1 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" |
1 change: 1 addition & 0 deletions
1
tests/modified/operator/daemonset-with-annotations/00-install.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 @@ | ||
../../../operator/daemonset-with-annotations/00-install.yaml |
15 changes: 15 additions & 0 deletions
15
tests/modified/operator/deployment-with-annotations/00-assert.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,15 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: deployment-with-annotations | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- selector: app=deployment-with-annotations | ||
commands: | ||
- script: "[ $(kubectl logs -l app=deployment-with-annotations -c tailing-sidecar-0 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" | ||
- script: "[ $(kubectl logs -l app=deployment-with-annotations -c tailing-sidecar-1 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" |
1 change: 1 addition & 0 deletions
1
tests/modified/operator/deployment-with-annotations/00-install.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 @@ | ||
../../../operator/deployment-with-annotations/00-install.yaml |
22 changes: 22 additions & 0 deletions
22
tests/modified/operator/deployment-with-annotations/01-assert.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,22 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: deployment-with-annotations | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
status: | ||
phase: Running | ||
containerStatuses: | ||
- name: count | ||
- name: tailing-sidecar-0 | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- selector: app=deployment-with-annotations | ||
commands: | ||
- script: "[ $(kubectl logs -l app=deployment-with-annotations -c tailing-sidecar-0 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" |
1 change: 1 addition & 0 deletions
1
tests/modified/operator/deployment-with-annotations/01-update.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 @@ | ||
../../../operator/deployment-with-annotations/01-update.yaml |
14 changes: 14 additions & 0 deletions
14
tests/modified/operator/pod-with-annotations/00-assert.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,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-with-annotations | ||
status: | ||
phase: Running | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- pod: pod-with-annotations | ||
commands: | ||
- script: "[ $(kubectl logs pod-with-annotations tailing-sidecar-0 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" | ||
- script: "[ $(kubectl logs pod-with-annotations named-container -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" |
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 @@ | ||
../../../operator/pod-with-annotations/00-install.yaml |
15 changes: 15 additions & 0 deletions
15
tests/modified/operator/pod-with-annotations/01-assert.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,15 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-with-annotations-updated | ||
status: | ||
phase: Running | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- pod: pod-with-annotations-updated | ||
commands: | ||
- script: "[ $(kubectl logs pod-with-annotations-updated tailing-sidecar-0 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" | ||
- script: "[ $(kubectl logs pod-with-annotations-updated named-sidecar -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" | ||
- script: "[ $(kubectl logs pod-with-annotations-updated tailing-sidecar-1 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" |
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 @@ | ||
../../../operator/pod-with-annotations/01-update.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,15 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-with-tailing-sidecar-config | ||
status: | ||
phase: Running | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- pod: pod-with-tailing-sidecar-config | ||
commands: | ||
- script: "[ $(kubectl logs pod-with-tailing-sidecar-config sidecar-0 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" | ||
- script: "[ $(kubectl logs pod-with-tailing-sidecar-config sidecar-1 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" | ||
- script: "[ $(kubectl logs pod-with-tailing-sidecar-config sidecar-2 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" |
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 @@ | ||
../../../operator/pod-with-cr/00-install.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,16 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-with-tailing-sidecar-config | ||
status: | ||
phase: Running | ||
containerStatuses: | ||
- name: count | ||
- name: sidecar-2 | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- pod: pod-with-tailing-sidecar-config | ||
commands: | ||
- script: "[ $(kubectl logs pod-with-tailing-sidecar-config sidecar-2 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" |
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 @@ | ||
../../../operator/pod-with-cr/01-update.yaml |
8 changes: 8 additions & 0 deletions
8
tests/modified/operator/pod-without-annotations/00-assert.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,8 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-without-annotations | ||
status: | ||
phase: Running | ||
containerStatuses: | ||
- name: count |
1 change: 1 addition & 0 deletions
1
tests/modified/operator/pod-without-annotations/00-install.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 @@ | ||
../../../operator/pod-without-annotations/00-install.yaml |
15 changes: 15 additions & 0 deletions
15
tests/modified/operator/statefulset-with-annotations/00-assert.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,15 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: statefulset-with-annotations | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- pod: statefulset-with-annotations-0 | ||
commands: | ||
- script: "[ $(kubectl logs statefulset-with-annotations-0 my-named-sidecar -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" | ||
- script: "[ $(kubectl logs statefulset-with-annotations-0 tailing-sidecar-1 -n ${NAMESPACE} --tail 5 | grep modified | wc -l) -eq 5 ]" |
1 change: 1 addition & 0 deletions
1
tests/modified/operator/statefulset-with-annotations/00-install.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 @@ | ||
../../../operator/statefulset-with-annotations/00-install.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,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: example-with-tailling-sidecars | ||
status: | ||
phase: Running | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- pod: example-with-tailling-sidecars | ||
commands: | ||
- script: "[ $(kubectl logs -n $NAMESPACE --tail 5 example-with-tailling-sidecars sidecar1 | grep modified | wc -l) -eq 5 ]" | ||
- script: "[ $(kubectl logs -n $NAMESPACE --tail 5 example-with-tailling-sidecars sidecar2 | grep modified | wc -l) -eq 5 ]" |
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 @@ | ||
../../../sidecar/pod-with-sidecar/00-install.yaml |