Skip to content

Commit 63f6c48

Browse files
update e2e testcase
Signed-off-by: Ishita Sequeira <[email protected]>
1 parent 256a6c4 commit 63f6c48

File tree

4 files changed

+47
-24
lines changed

4 files changed

+47
-24
lines changed

test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
apiVersion: argoproj.io/v1alpha1
22
kind: Application
33
metadata:
4-
annotations:
5-
argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0
6-
argocd-image-updater.argoproj.io/guestbook.update-strategy: semver
74
name: image-updater-006
8-
spec:
9-
project: project-one
10-
source:
11-
repoURL: https://github.com/argoproj/argocd-example-apps.git
12-
path: kustomize-guestbook
13-
targetRevision: HEAD
14-
destination:
15-
server: https://kubernetes.default.svc
16-
namespace: image-updater-e2e-006-01
17-
syncPolicy:
18-
automated: {}
19-
retry:
20-
limit: 2
5+
namespace: image-updater-e2e-006-01
216
status:
227
health:
238
status: Healthy

test/e2e/suite/006-apps-in-any-namespace/01-install.yaml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
11
apiVersion: v1
22
kind: Namespace
33
metadata:
4-
name: image-updater-e2e-006
4+
name: image-updater-e2e-006-01
55
---
6-
apiVersion: v1
7-
kind: Namespace
6+
apiVersion: rbac.authorization.k8s.io/v1
7+
kind: Role
88
metadata:
9-
name: image-updater-e2e-006-01
9+
name: argocd-application-controller
10+
namespace: image-updater-e2e-006-01 # Target namespace where the app will be deployed
11+
rules:
12+
- apiGroups: [""]
13+
resources: ["pods", "services", "replicationcontrollers"]
14+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
15+
- apiGroups: ["apps"]
16+
resources: ["deployments", "daemonsets", "replicasets", "statefulsets"]
17+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
18+
- apiGroups: ["extensions"]
19+
resources: ["ingresses"]
20+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
21+
---
22+
apiVersion: rbac.authorization.k8s.io/v1
23+
kind: RoleBinding
24+
metadata:
25+
name: argocd-application-controller-binding
26+
namespace: image-updater-e2e-006-01 # Namespace where the Argo CD application is managed
27+
roleRef:
28+
apiGroup: rbac.authorization.k8s.io
29+
kind: Role
30+
name: argocd-application-controller
31+
namespace: argocd-image-updater-e2e # Namespace where the Argo CD application controller is running
32+
subjects:
33+
- kind: ServiceAccount
34+
name: argocd-application-controller
35+
namespace: argocd-image-updater-e2e # Namespace where the Argo CD application controller is running
1036
---
1137
apiVersion: v1
1238
kind: ConfigMap
@@ -17,7 +43,7 @@ metadata:
1743
app.kubernetes.io/name: argocd-cmd-params-cm
1844
app.kubernetes.io/part-of: argocd
1945
data:
20-
application.namespaces: image-updater-e2e-006-01
46+
application.namespaces: '*'
2147
---
2248
kind: AppProject
2349
apiVersion: argoproj.io/v1alpha1
@@ -45,6 +71,7 @@ apiVersion: argoproj.io/v1alpha1
4571
kind: Application
4672
metadata:
4773
name: image-updater-006
74+
namespace: image-updater-e2e-006-01
4875
annotations:
4976
argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0
5077
argocd-image-updater.argoproj.io/guestbook.update-strategy: semver
@@ -58,6 +85,6 @@ spec:
5885
server: https://kubernetes.default.svc
5986
namespace: image-updater-e2e-006-01
6087
syncPolicy:
61-
automated: {}
62-
retry:
63-
limit: 2
88+
automated:
89+
prune: true
90+
selfHeal: true

test/e2e/suite/006-apps-in-any-namespace/02-assert.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
---
12
apiVersion: argoproj.io/v1alpha1
23
kind: Application
34
metadata:
45
name: image-updater-006
6+
namespace: image-updater-e2e-006-01
57
spec:
68
source:
79
kustomize:

test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ delete:
55
- apiVersion: argoproj.io/v1alpha1
66
kind: Application
77
name: image-updater-006
8+
namespace: image-updater-e2e-006-01
89
- apiVersion: argoproj.io/v1alpha1
910
kind: AppProject
1011
name: project-one
@@ -14,6 +15,14 @@ delete:
1415
- apiVersion: v1
1516
kind: Namespace
1617
name: image-updater-e2e-006
18+
- apiVersion: rbac.authorization.k8s.io/v1
19+
kind: Role
20+
name: argocd-application-controller
21+
namespace: image-updater-e2e-006-01
22+
- apiVersion: rbac.authorization.k8s.io/v1
23+
kind: RoleBinding
24+
name: argocd-application-controller-binding
25+
namespace: image-updater-e2e-006-01
1726
script: |
1827
kubectl patch configmap argocd-cmd-params-cm -n argocd-image-updater-e2e --type=json -p='[{"op": "remove", "path": "/data/application.namespaces"}]'
1928
kubectl rollout restart -n argocd-image-updater-e2e deployment argocd-server

0 commit comments

Comments
 (0)