Skip to content

Commit 80f47bf

Browse files
ishitasequeirachengfang
authored andcommitted
Add e2e tests for apps in any namespace feature
Signed-off-by: Ishita Sequeira <[email protected]>
1 parent 3e7378a commit 80f47bf

File tree

6 files changed

+239
-0
lines changed

6 files changed

+239
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
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
7+
name: image-updater-006
8+
spec:
9+
project: default
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
21+
status:
22+
health:
23+
status: Healthy
24+
sync:
25+
status: Synced
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: image-updater-e2e-006
5+
---
6+
apiVersion: v1
7+
kind: Namespace
8+
metadata:
9+
name: image-updater-e2e-006-01
10+
---
11+
apiVersion: v1
12+
kind: ConfigMap
13+
metadata:
14+
name: argocd-cmd-params-cm
15+
namespace: argocd-image-updater-e2e
16+
labels:
17+
app.kubernetes.io/name: argocd-cmd-params-cm
18+
app.kubernetes.io/part-of: argocd
19+
data:
20+
application.namespaces: image-updater-e2e-006-01
21+
---
22+
kind: AppProject
23+
apiVersion: argoproj.io/v1alpha1
24+
metadata:
25+
name: project-one
26+
namespace: argocd-image-updater-e2e
27+
spec:
28+
sourceNamespaces:
29+
- image-updater-e2e-test
30+
---
31+
apiVersion: kuttl.dev/v1beta1
32+
kind: TestStep
33+
commands:
34+
- script: |
35+
kubectl rollout restart -n argocd-image-updater-e2e deployment argocd-server
36+
kubectl rollout restart -n argocd-image-updater-e2e statefulset argocd-application-controller
37+
sleep 30
38+
---
39+
apiVersion: argoproj.io/v1alpha1
40+
kind: Application
41+
metadata:
42+
name: image-updater-006
43+
annotations:
44+
argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0
45+
argocd-image-updater.argoproj.io/guestbook.update-strategy: semver
46+
spec:
47+
project: default
48+
source:
49+
repoURL: https://github.com/argoproj/argocd-example-apps.git
50+
path: kustomize-guestbook
51+
targetRevision: HEAD
52+
destination:
53+
server: https://kubernetes.default.svc
54+
namespace: image-updater-e2e-006-01
55+
syncPolicy:
56+
automated: {}
57+
retry:
58+
limit: 2
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: image-updater-006
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: v1
17+
kind: Pod
18+
metadata:
19+
namespace: image-updater-e2e-006-01
20+
spec:
21+
containers:
22+
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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+
--loglevel trace
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+
timeout: 120
4+
delete:
5+
- apiVersion: argoproj.io/v1alpha1
6+
kind: Application
7+
name: image-updater-006
8+
- apiVersion: v1
9+
kind: Namespace
10+
name: image-updater-e2e-006-01

0 commit comments

Comments
 (0)