Skip to content

Commit 5dba714

Browse files
authored
chore: add e2e tests for filtering applications by label with match-application-label command line option (#834)
Signed-off-by: Cheng Fang <[email protected]>
1 parent 43dbd63 commit 5dba714

File tree

6 files changed

+297
-0
lines changed

6 files changed

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

0 commit comments

Comments
 (0)