-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add e2e tests for filtering applications by label with match-a…
…pplication-label command line option (#834) Signed-off-by: Cheng Fang <[email protected]>
- Loading branch information
Showing
6 changed files
with
297 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
test/e2e/suite/101-kustomize-match-application-label/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,29 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: image-updater-101-0 | ||
status: | ||
health: | ||
status: Healthy | ||
sync: | ||
status: Synced | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: image-updater-101-1 | ||
status: | ||
health: | ||
status: Healthy | ||
sync: | ||
status: Synced | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: image-updater-101-2 | ||
status: | ||
health: | ||
status: Healthy | ||
sync: | ||
status: Synced |
87 changes: 87 additions & 0 deletions
87
test/e2e/suite/101-kustomize-match-application-label/01-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,87 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: image-updater-e2e-101-0 | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: image-updater-101-0 | ||
labels: | ||
app.index: "0" | ||
annotations: | ||
argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0 | ||
argocd-image-updater.argoproj.io/test.update-strategy: semver | ||
finalizers: | ||
- resources-finalizer.argocd.argoproj.io | ||
spec: | ||
project: default | ||
source: | ||
repoURL: https://github.com/argoproj/argocd-example-apps.git | ||
path: kustomize-guestbook | ||
targetRevision: HEAD | ||
destination: | ||
server: https://kubernetes.default.svc | ||
namespace: image-updater-e2e-101-0 | ||
syncPolicy: | ||
automated: {} | ||
retry: | ||
limit: 2 | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: image-updater-e2e-101-1 | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: image-updater-101-1 | ||
labels: | ||
app.index: "1" | ||
annotations: | ||
argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0 | ||
argocd-image-updater.argoproj.io/test.update-strategy: semver | ||
finalizers: | ||
- resources-finalizer.argocd.argoproj.io | ||
spec: | ||
project: default | ||
source: | ||
repoURL: https://github.com/argoproj/argocd-example-apps.git | ||
path: kustomize-guestbook | ||
targetRevision: HEAD | ||
destination: | ||
server: https://kubernetes.default.svc | ||
namespace: image-updater-e2e-101-1 | ||
syncPolicy: | ||
automated: {} | ||
retry: | ||
limit: 2 | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: image-updater-e2e-101-2 | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: image-updater-101-2 | ||
annotations: | ||
argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0 | ||
argocd-image-updater.argoproj.io/test.update-strategy: semver | ||
finalizers: | ||
- resources-finalizer.argocd.argoproj.io | ||
spec: | ||
project: default | ||
source: | ||
repoURL: https://github.com/argoproj/argocd-example-apps.git | ||
path: kustomize-guestbook | ||
targetRevision: HEAD | ||
destination: | ||
server: https://kubernetes.default.svc | ||
namespace: image-updater-e2e-101-2 | ||
syncPolicy: | ||
automated: {} | ||
retry: | ||
limit: 2 |
34 changes: 34 additions & 0 deletions
34
test/e2e/suite/101-kustomize-match-application-label/02-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,34 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: image-updater-101-0 | ||
spec: | ||
source: | ||
kustomize: | ||
images: | ||
- gcr.io/heptio-images/ks-guestbook-demo:0.2 | ||
status: | ||
health: | ||
status: Healthy | ||
sync: | ||
status: Synced | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: image-updater-101-1 | ||
status: | ||
health: | ||
status: Healthy | ||
sync: | ||
status: Synced | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: image-updater-101-2 | ||
status: | ||
health: | ||
status: Healthy | ||
sync: | ||
status: Synced |
8 changes: 8 additions & 0 deletions
8
test/e2e/suite/101-kustomize-match-application-label/02-run-updater.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: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: | | ||
${SRC_DIR}/dist/argocd-image-updater run --once \ | ||
--argocd-namespace argocd-image-updater-e2e \ | ||
--match-application-label app.index=0 \ | ||
--loglevel trace |
22 changes: 22 additions & 0 deletions
22
test/e2e/suite/101-kustomize-match-application-label/99-delete.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: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
timeout: 120 | ||
delete: | ||
- apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
name: image-updater-101-0 | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: image-updater-e2e-101-0 | ||
- apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
name: image-updater-101-1 | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: image-updater-e2e-101-1 | ||
- apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
name: image-updater-101-2 | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: image-updater-e2e-101-2 |
Oops, something went wrong.