Skip to content

Commit 6530702

Browse files
authored
test: Add e2e test for multiple images (argoproj-labs#383)
Signed-off-by: jannfis <[email protected]>
1 parent 474a576 commit 6530702

File tree

9 files changed

+126
-0
lines changed

9 files changed

+126
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: e2e-registry
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: test-app-001
10+
component: argocd-image-updater-e2e
11+
template:
12+
metadata:
13+
labels:
14+
app: test-app-001
15+
component: argocd-image-updater-e2e
16+
spec:
17+
containers:
18+
- name: test1
19+
image: 10.42.0.1:30000/test-image:1.0.0
20+
- name: test2
21+
image: 10.42.0.1:30000/other-image:1.0.0
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- deployment.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: image-updater-004
5+
status:
6+
health:
7+
status: Healthy
8+
sync:
9+
status: Synced
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: image-updater-e2e-004
5+
---
6+
apiVersion: argoproj.io/v1alpha1
7+
kind: Application
8+
metadata:
9+
name: image-updater-004
10+
annotations:
11+
argocd-image-updater.argoproj.io/image-list: test1=10.42.0.1:30000/test-image:1.X.X,test2=10.42.0.1:30000/other-image:1.X.X
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: http://10.42.0.1:30002/testdata.git
19+
path: ./004-multi-images
20+
targetRevision: HEAD
21+
destination:
22+
server: https://kubernetes.default.svc
23+
namespace: image-updater-e2e-004
24+
syncPolicy:
25+
automated: {}
26+
retry:
27+
limit: 2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: image-updater-004
5+
spec:
6+
source:
7+
kustomize:
8+
images:
9+
- 10.42.0.1:30000/test-image:1.0.2
10+
- 10.42.0.1:30000/other-image:1.0.1
11+
status:
12+
health:
13+
status: Healthy
14+
sync:
15+
status: Synced
16+
---
17+
apiVersion: v1
18+
kind: Pod
19+
metadata:
20+
namespace: image-updater-e2e-004
21+
spec:
22+
containers:
23+
- image: 10.42.0.1:30000/test-image:1.0.2
24+
- image: 10.42.0.1:30000/other-image:1.0.1
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+
--registries-conf-path ${SRC_DIR}/test/e2e/assets/registries.conf \
8+
--loglevel trace
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-004
8+
- apiVersion: v1
9+
kind: Namespace
10+
name: image-updater-e2e-004
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: e2e-registry
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: test-app-001
10+
component: argocd-image-updater-e2e
11+
template:
12+
metadata:
13+
labels:
14+
app: test-app-001
15+
component: argocd-image-updater-e2e
16+
spec:
17+
containers:
18+
- name: test1
19+
image: 10.42.0.1:30000/test-image:1.0.0
20+
- name: test2
21+
image: 10.42.0.1:30000/other-image:1.0.0
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- deployment.yaml

0 commit comments

Comments
 (0)