From dfc0469f6323e12a074f7002b3b4bfb763d0ed0f Mon Sep 17 00:00:00 2001 From: Anand Kumar Singh Date: Wed, 27 Nov 2024 12:01:31 +0530 Subject: [PATCH 1/2] add tests for bug: appset image fields not respected Signed-off-by: Anand Kumar Singh --- .../01-add_applicationset_image.yaml | 12 ++++++++++++ .../01-validate.yaml | 16 ++++++++++++++++ .../02-remove_argocdcustom_image.yaml | 11 +++++++++++ .../02-validate.yaml | 16 ++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 tests/k8s/1-045_validate_applicationset_image_override/01-add_applicationset_image.yaml create mode 100644 tests/k8s/1-045_validate_applicationset_image_override/01-validate.yaml create mode 100644 tests/k8s/1-045_validate_applicationset_image_override/02-remove_argocdcustom_image.yaml create mode 100644 tests/k8s/1-045_validate_applicationset_image_override/02-validate.yaml diff --git a/tests/k8s/1-045_validate_applicationset_image_override/01-add_applicationset_image.yaml b/tests/k8s/1-045_validate_applicationset_image_override/01-add_applicationset_image.yaml new file mode 100644 index 000000000..6db7112bc --- /dev/null +++ b/tests/k8s/1-045_validate_applicationset_image_override/01-add_applicationset_image.yaml @@ -0,0 +1,12 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: example-argocd + labels: + example: basic +spec: + image: argocdimage + version: tag002 + applicationSet: + image: testimage + version: tag001 diff --git a/tests/k8s/1-045_validate_applicationset_image_override/01-validate.yaml b/tests/k8s/1-045_validate_applicationset_image_override/01-validate.yaml new file mode 100644 index 000000000..a34701cbf --- /dev/null +++ b/tests/k8s/1-045_validate_applicationset_image_override/01-validate.yaml @@ -0,0 +1,16 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-argocd-applicationset-controller +spec: + template: + metadata: + labels: + example: basic + spec: + containers: + - image: "testimage:tag001" + name: argocd-applicationset-controller + selector: + matchLabels: + example: basic \ No newline at end of file diff --git a/tests/k8s/1-045_validate_applicationset_image_override/02-remove_argocdcustom_image.yaml b/tests/k8s/1-045_validate_applicationset_image_override/02-remove_argocdcustom_image.yaml new file mode 100644 index 000000000..c5a040203 --- /dev/null +++ b/tests/k8s/1-045_validate_applicationset_image_override/02-remove_argocdcustom_image.yaml @@ -0,0 +1,11 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: example-argocd + labels: + example: basic +spec: + + applicationSet: + image: testimage + version: tag001 diff --git a/tests/k8s/1-045_validate_applicationset_image_override/02-validate.yaml b/tests/k8s/1-045_validate_applicationset_image_override/02-validate.yaml new file mode 100644 index 000000000..a34701cbf --- /dev/null +++ b/tests/k8s/1-045_validate_applicationset_image_override/02-validate.yaml @@ -0,0 +1,16 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-argocd-applicationset-controller +spec: + template: + metadata: + labels: + example: basic + spec: + containers: + - image: "testimage:tag001" + name: argocd-applicationset-controller + selector: + matchLabels: + example: basic \ No newline at end of file From 2b5e6cfd1685c3ad7bf79a90735b3cf206a3b646 Mon Sep 17 00:00:00 2001 From: Anand Kumar Singh Date: Wed, 27 Nov 2024 13:51:19 +0530 Subject: [PATCH 2/2] fix assert files for tests Signed-off-by: Anand Kumar Singh --- .../{02-validate.yaml => 01-assert.yaml} | 8 +------- .../{01-validate.yaml => 02-assert.yaml} | 6 ------ 2 files changed, 1 insertion(+), 13 deletions(-) rename tests/k8s/1-045_validate_applicationset_image_override/{02-validate.yaml => 01-assert.yaml} (54%) rename tests/k8s/1-045_validate_applicationset_image_override/{01-validate.yaml => 02-assert.yaml} (69%) diff --git a/tests/k8s/1-045_validate_applicationset_image_override/02-validate.yaml b/tests/k8s/1-045_validate_applicationset_image_override/01-assert.yaml similarity index 54% rename from tests/k8s/1-045_validate_applicationset_image_override/02-validate.yaml rename to tests/k8s/1-045_validate_applicationset_image_override/01-assert.yaml index a34701cbf..2a6ab1412 100644 --- a/tests/k8s/1-045_validate_applicationset_image_override/02-validate.yaml +++ b/tests/k8s/1-045_validate_applicationset_image_override/01-assert.yaml @@ -4,13 +4,7 @@ metadata: name: example-argocd-applicationset-controller spec: template: - metadata: - labels: - example: basic spec: containers: - image: "testimage:tag001" - name: argocd-applicationset-controller - selector: - matchLabels: - example: basic \ No newline at end of file + name: argocd-applicationset-controller \ No newline at end of file diff --git a/tests/k8s/1-045_validate_applicationset_image_override/01-validate.yaml b/tests/k8s/1-045_validate_applicationset_image_override/02-assert.yaml similarity index 69% rename from tests/k8s/1-045_validate_applicationset_image_override/01-validate.yaml rename to tests/k8s/1-045_validate_applicationset_image_override/02-assert.yaml index a34701cbf..957dbdd67 100644 --- a/tests/k8s/1-045_validate_applicationset_image_override/01-validate.yaml +++ b/tests/k8s/1-045_validate_applicationset_image_override/02-assert.yaml @@ -4,13 +4,7 @@ metadata: name: example-argocd-applicationset-controller spec: template: - metadata: - labels: - example: basic spec: containers: - image: "testimage:tag001" name: argocd-applicationset-controller - selector: - matchLabels: - example: basic \ No newline at end of file