Skip to content

Commit 0c9c0a9

Browse files
authored
tests(e2e): Add e2e test for filtering apps by name with match-application-name option (#841)
Signed-off-by: Cheng Fang <[email protected]>
1 parent 5dba714 commit 0c9c0a9

File tree

11 files changed

+309
-0
lines changed

11 files changed

+309
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: image-updater-e2e-102-0
5+
---
6+
apiVersion: argoproj.io/v1alpha1
7+
kind: Application
8+
metadata:
9+
name: image-updater-102-0
10+
annotations:
11+
argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0
12+
argocd-image-updater.argoproj.io/test.update-strategy: semver
13+
finalizers:
14+
- resources-finalizer.argocd.argoproj.io
15+
spec:
16+
project: default
17+
source:
18+
repoURL: https://github.com/argoproj/argocd-example-apps.git
19+
path: kustomize-guestbook
20+
targetRevision: HEAD
21+
destination:
22+
server: https://kubernetes.default.svc
23+
namespace: image-updater-e2e-102-0
24+
syncPolicy:
25+
automated: {}
26+
retry:
27+
limit: 2
28+
---
29+
apiVersion: v1
30+
kind: Namespace
31+
metadata:
32+
name: image-updater-e2e-102-1
33+
---
34+
apiVersion: argoproj.io/v1alpha1
35+
kind: Application
36+
metadata:
37+
name: image-updater-102-1
38+
annotations:
39+
argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0
40+
argocd-image-updater.argoproj.io/test.update-strategy: semver
41+
finalizers:
42+
- resources-finalizer.argocd.argoproj.io
43+
spec:
44+
project: default
45+
source:
46+
repoURL: https://github.com/argoproj/argocd-example-apps.git
47+
path: kustomize-guestbook
48+
targetRevision: HEAD
49+
destination:
50+
server: https://kubernetes.default.svc
51+
namespace: image-updater-e2e-102-1
52+
syncPolicy:
53+
automated: {}
54+
retry:
55+
limit: 2
56+
---
57+
apiVersion: v1
58+
kind: Namespace
59+
metadata:
60+
name: image-updater-e2e-102-2
61+
---
62+
apiVersion: argoproj.io/v1alpha1
63+
kind: Application
64+
metadata:
65+
name: image-updater-102-2
66+
annotations:
67+
argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0
68+
argocd-image-updater.argoproj.io/test.update-strategy: semver
69+
finalizers:
70+
- resources-finalizer.argocd.argoproj.io
71+
spec:
72+
project: default
73+
source:
74+
repoURL: https://github.com/argoproj/argocd-example-apps.git
75+
path: kustomize-guestbook
76+
targetRevision: HEAD
77+
destination:
78+
server: https://kubernetes.default.svc
79+
namespace: image-updater-e2e-102-2
80+
syncPolicy:
81+
automated: {}
82+
retry:
83+
limit: 2
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: image-updater-102-0
5+
status:
6+
health:
7+
status: Healthy
8+
sync:
9+
status: Synced
10+
---
11+
apiVersion: argoproj.io/v1alpha1
12+
kind: Application
13+
metadata:
14+
name: image-updater-102-1
15+
status:
16+
health:
17+
status: Healthy
18+
sync:
19+
status: Synced
20+
---
21+
apiVersion: argoproj.io/v1alpha1
22+
kind: Application
23+
metadata:
24+
name: image-updater-102-2
25+
status:
26+
health:
27+
status: Healthy
28+
sync:
29+
status: Synced
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
${SRC_DIR}/dist/argocd-image-updater run --once \
6+
--argocd-namespace argocd-image-updater-e2e \
7+
--match-application-name no-match* \
8+
--registries-conf-path="" \
9+
--loglevel info
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: image-updater-102-0
5+
spec:
6+
source:
7+
kustomize:
8+
images:
9+
- gcr.io/heptio-images/ks-guestbook-demo:0.2
10+
status:
11+
health:
12+
status: Healthy
13+
sync:
14+
status: Synced
15+
---
16+
apiVersion: argoproj.io/v1alpha1
17+
kind: Application
18+
metadata:
19+
name: image-updater-102-1
20+
status:
21+
health:
22+
status: Healthy
23+
sync:
24+
status: Synced
25+
---
26+
apiVersion: argoproj.io/v1alpha1
27+
kind: Application
28+
metadata:
29+
name: image-updater-102-2
30+
status:
31+
health:
32+
status: Healthy
33+
sync:
34+
status: Synced
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
${SRC_DIR}/dist/argocd-image-updater run --once \
6+
--argocd-namespace argocd-image-updater-e2e \
7+
--match-application-name image-updater-102-0 \
8+
--registries-conf-path="" \
9+
--loglevel info
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: image-updater-102-0
5+
spec:
6+
source:
7+
kustomize:
8+
images:
9+
- gcr.io/heptio-images/ks-guestbook-demo:0.2
10+
status:
11+
health:
12+
status: Healthy
13+
sync:
14+
status: Synced
15+
---
16+
apiVersion: argoproj.io/v1alpha1
17+
kind: Application
18+
metadata:
19+
name: image-updater-102-1
20+
spec:
21+
source:
22+
kustomize:
23+
images:
24+
- gcr.io/heptio-images/ks-guestbook-demo:0.2
25+
status:
26+
health:
27+
status: Healthy
28+
sync:
29+
status: Synced
30+
---
31+
apiVersion: argoproj.io/v1alpha1
32+
kind: Application
33+
metadata:
34+
name: image-updater-102-2
35+
status:
36+
health:
37+
status: Healthy
38+
sync:
39+
status: Synced
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
${SRC_DIR}/dist/argocd-image-updater run --once \
6+
--argocd-namespace argocd-image-updater-e2e \
7+
--match-application-name image-updater-102-0 \
8+
--match-application-name image-updater-102-1 \
9+
--registries-conf-path="" \
10+
--loglevel info
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: image-updater-102-0
5+
spec:
6+
source:
7+
kustomize:
8+
images:
9+
- gcr.io/heptio-images/ks-guestbook-demo:0.2
10+
status:
11+
health:
12+
status: Healthy
13+
sync:
14+
status: Synced
15+
---
16+
apiVersion: argoproj.io/v1alpha1
17+
kind: Application
18+
metadata:
19+
name: image-updater-102-1
20+
spec:
21+
source:
22+
kustomize:
23+
images:
24+
- gcr.io/heptio-images/ks-guestbook-demo:0.2
25+
status:
26+
health:
27+
status: Healthy
28+
sync:
29+
status: Synced
30+
---
31+
apiVersion: argoproj.io/v1alpha1
32+
kind: Application
33+
metadata:
34+
name: image-updater-102-2
35+
spec:
36+
source:
37+
kustomize:
38+
images:
39+
- gcr.io/heptio-images/ks-guestbook-demo:0.2
40+
status:
41+
health:
42+
status: Healthy
43+
sync:
44+
status: Synced
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
${SRC_DIR}/dist/argocd-image-updater run --once \
6+
--argocd-namespace argocd-image-updater-e2e \
7+
--match-application-name image-updater-102-* \
8+
--registries-conf-path="" \
9+
--loglevel info
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
timeout: 120
4+
delete:
5+
- apiVersion: argoproj.io/v1alpha1
6+
kind: Application
7+
name: image-updater-102-0
8+
- apiVersion: v1
9+
kind: Namespace
10+
name: image-updater-e2e-102-0
11+
- apiVersion: argoproj.io/v1alpha1
12+
kind: Application
13+
name: image-updater-102-1
14+
- apiVersion: v1
15+
kind: Namespace
16+
name: image-updater-e2e-102-1
17+
- apiVersion: argoproj.io/v1alpha1
18+
kind: Application
19+
name: image-updater-102-2
20+
- apiVersion: v1
21+
kind: Namespace
22+
name: image-updater-e2e-102-2

0 commit comments

Comments
 (0)